diff options
Diffstat (limited to 'lua/talha/remap.lua')
-rw-r--r-- | lua/talha/remap.lua | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/lua/talha/remap.lua b/lua/talha/remap.lua index 0569836..f2c714b 100644 --- a/lua/talha/remap.lua +++ b/lua/talha/remap.lua @@ -1,3 +1,14 @@ +-- easier navigation +vim.keymap.set("n", "<C-h>", "<C-w><C-h>") +vim.keymap.set("n", "<C-j>", "<C-w><C-j>") +vim.keymap.set("n", "<C-k>", "<C-w><C-k>") +vim.keymap.set("n", "<C-l>", "<C-w><C-l>") + +-- tab navigation +vim.keymap.set("n", "<C-t><C-n>", vim.cmd.tabnew) +vim.keymap.set("n", "<C-t><C-h>", vim.cmd.tabp) +vim.keymap.set("n", "<C-t><C-l>", vim.cmd.tabn) + -- open project view with netrw vim.keymap.set("n", "<leader>pv", vim.cmd.Ex) @@ -22,11 +33,6 @@ vim.keymap.set("n", "N", "Nzzzv") vim.keymap.set("x", "<leader>p", "\"_dP") --- Tab navigation -vim.keymap.set("n", "<C-t>n", vim.cmd.tabn) --- go to prev error -vim.keymap.set("n", "<C-t>p", vim.cmd.tabp) - ---- system clipboard -- copying vim.keymap.set("n", "<leader>y", [["+y]]) @@ -51,9 +57,8 @@ vim.keymap.set("n", "<A-n>", function() SafeCListNav(1) end) -- go to prev error vim.keymap.set("n", "<A-p>", function() SafeCListNav(-1) end) -- open error list when there are errors -vim.keymap.set("n", "<A-e>", vim.cmd.cw) +vim.keymap.set("n", "<A-w>", vim.cmd.cw) + +---- snippets +vim.keymap.set("n", "<A-s>", [[:lua LoadSnippet('')<Left><Left>]]) --- building -vim.keymap.set("n", "<F5>", function() - vim.cmd.Neomake{bang=true}; -end) |