From 8e1d8c50b651811bc13316ba19682d525b4c18a0 Mon Sep 17 00:00:00 2001 From: Vlad Date: Thu, 23 Nov 2023 16:07:12 +0300 Subject: [PATCH] Windows, tabs and fast cd's remapping --- lua/nefrace/remap.lua | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/lua/nefrace/remap.lua b/lua/nefrace/remap.lua index b760350..483a38f 100644 --- a/lua/nefrace/remap.lua +++ b/lua/nefrace/remap.lua @@ -1,2 +1,24 @@ vim.g.mapleader = " " vim.keymap.set("n", "pv", vim.cmd.Ex) + +vim.keymap.set("n", "cdp", ":cd %:p:h") +vim.keymap.set("n", "cdc", ":cd $HOME/.config/nvim") +vim.keymap.set("n", "cdb", ":cd -") + + +--- Tabs +vim.keymap.set("n", "tt", vim.cmd.tabnew) +vim.keymap.set("n", "tq", vim.cmd.tabclose) +vim.keymap.set("n", "to", vim.cmd.tabonly) +vim.keymap.set("n", "te", vim.cmd.tab) +vim.keymap.set("n", "th", vim.cmd.tabprevious) +vim.keymap.set("n", "tl", vim.cmd.tabnext) +for i = 1, 9, 1 do + vim.keymap.set("n", "t"..i, ":"..i.."tabnext") +end + +--- Windows +vim.keymap.set("n", "ws", vim.cmd.split) +vim.keymap.set("n", "wv", vim.cmd.vsplit) +vim.keymap.set("n", "wq", vim.cmd.quit) +