Fix mapping gj / gk with counts

This commit is contained in:
Thomas Avé 2024-10-22 17:05:39 +02:00
parent 8d8d782dd0
commit 4c9272c685
1 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
vim.keymap.set("i", "jj", "<Esc>", {})
vim.keymap.set("n", "j", "gj", {silent = true})
vim.keymap.set("n", "k", "gk", {silent = true})
vim.keymap.set({ "n", "v" }, "k", "v:count == 0 ? 'gk' : 'k'", { expr = true })
vim.keymap.set({ "n", "v" }, "j", "v:count == 0 ? 'gj' : 'j'", { expr = true })
vim.keymap.set("n", "<S-k>", "<Nop>", {})
vim.keymap.set("t", "jj", "<C-\\><C-n>", { noremap = true, silent = true })
vim.keymap.set("n", "<Backspace>", ":q<cr>", { noremap = true, silent = true })