diff options
Diffstat (limited to 'lua/talha/remap.lua')
-rw-r--r-- | lua/talha/remap.lua | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/lua/talha/remap.lua b/lua/talha/remap.lua index 882d651..cfd6624 100644 --- a/lua/talha/remap.lua +++ b/lua/talha/remap.lua @@ -1,5 +1,3 @@ -vim.g.mapleader = " " - -- open project view with netrw vim.keymap.set("n", "<leader>pv", vim.cmd.Ex) @@ -24,10 +22,16 @@ vim.keymap.set("n", "N", "Nzzzv") vim.keymap.set("x", "<leader>p", "\"_dP") --- copying to system clipboard +---- system clipboard +-- copying vim.keymap.set("n", "<leader>y", [["+y]]) vim.keymap.set("v", "<leader>y", [["+y]]) vim.keymap.set("n", "<leader>Y", [["+Y]]) +-- pasting +-- @note: for posting in insert mode use: <C-r>+ +vim.keymap.set("n", "<leader>p", [["+p]]) +vim.keymap.set("n", "<leader>P", [["+P]]) +vim.keymap.set("v", "<leader>p", [["+p]]) -- deleting without polluting vim clipboard vim.keymap.set({"n", "x"}, "x", [["_x]]) @@ -36,6 +40,13 @@ vim.keymap.set({"n", "x"}, "X", [["_d]]) -- global substitute the word cursor is on in current file vim.keymap.set("n", "<leader>s", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]]) --- remapping quickfix list navigation -vim.keymap.set("n", "<C-f>l", vim.cmd.cnext) -vim.keymap.set("n", "<C-f>h", vim.cmd.cprev) +---- remapping quickfix list navigation +-- go to next error +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) + +-- building +-- vim.keymap.set("n", "<F5>", vim.cmd.Neomake{bang=true}) |