diff options
author | Luca Matei Pintilie <luca@lucamatei.com> | 2023-07-30 19:49:26 +0000 |
---|---|---|
committer | Luca Matei Pintilie <luca@lucamatei.com> | 2023-07-30 19:49:26 +0000 |
commit | 43fd5c1630142d25dc560f7be36695fb33cc8c30 (patch) | |
tree | 3af5fa11a0b3f38c128b6051ccb3d7c48348dab1 /.config/nvim/lua/keybinds.lua | |
parent | 14fa309c3c7d70f36aac087350ceac3a7ff32dfc (diff) | |
download | dotfiles-43fd5c1630142d25dc560f7be36695fb33cc8c30.tar dotfiles-43fd5c1630142d25dc560f7be36695fb33cc8c30.tar.gz dotfiles-43fd5c1630142d25dc560f7be36695fb33cc8c30.tar.bz2 dotfiles-43fd5c1630142d25dc560f7be36695fb33cc8c30.tar.lz dotfiles-43fd5c1630142d25dc560f7be36695fb33cc8c30.tar.xz dotfiles-43fd5c1630142d25dc560f7be36695fb33cc8c30.tar.zst dotfiles-43fd5c1630142d25dc560f7be36695fb33cc8c30.zip |
Update neovim config code style a bit
Diffstat (limited to '')
-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>" }); |