diff options
Diffstat (limited to '.config/nvim/lua/keybinds.lua')
-rw-r--r-- | .config/nvim/lua/keybinds.lua | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/.config/nvim/lua/keybinds.lua b/.config/nvim/lua/keybinds.lua index 800eaab..b0cab46 100644 --- a/.config/nvim/lua/keybinds.lua +++ b/.config/nvim/lua/keybinds.lua @@ -42,11 +42,19 @@ vim.keymap.set("n", "<Leader>t", ":belowright split | resize 5 | terminal<CR>") vim.keymap.set("n", "<Leader>[", ufo.openAllFolds) vim.keymap.set("n", "<Leader>]", ufo.closeAllFolds) vim.keymap.set("n", "<Leader>r", vim.lsp.buf.rename) +vim.keymap.set("n", "<Leader>N", ":bnext<CR>") +vim.keymap.set("n", "<Leader>P", ":bprevious<CR>") -vim.keymap.set({ "n"; "o"; "x" }, "W", function() spider.motion("w") end) -vim.keymap.set({ "n"; "o"; "x" }, "E", function() spider.motion("e") end) -vim.keymap.set({ "n"; "o"; "x" }, "B", function() spider.motion("b") end) -vim.keymap.set({ "n"; "o"; "x" }, "gE", function() spider.motion("ge") end) +local spider_opts = { skipInsignificantPunctuation = true } + +vim.keymap.set({ "n"; "o"; "x" }, "<A-w>", + function() spider.motion("w", spider_opts) end) +vim.keymap.set({ "n"; "o"; "x" }, "<A-e>", + function() spider.motion("e", spider_opts) end) +vim.keymap.set({ "n"; "o"; "x" }, "<A-b>", + function() spider.motion("b", spider_opts) end) +vim.keymap.set({ "n"; "o"; "x" }, "<A-g><A-e>", + function() spider.motion("ge", spider_opts) end) vim.keymap.set({ "t" }, "<ESC>", "<C-\\><C-n>") vim.opt.whichwrap = "<,>,h,l,[,]" @@ -74,4 +82,6 @@ wk.register({ ["R"] = "Show References"; ["J"] = "Signature help"; ["U"] = "Undo tree"; + ["N"] = "Next tab"; + ["P"] = "Previous tab"; }, { prefix = "<leader>" }); |