Improve tab-switching keymaps in neovim

This commit is contained in:
Martin Larsson 2025-07-19 17:53:43 +02:00
parent f40a87fd4d
commit 99b220fcc8
2 changed files with 13 additions and 11 deletions

View file

@ -64,8 +64,13 @@ keybind = alt+right=unbind
keybind = ctrl+shift+left=unbind keybind = ctrl+shift+left=unbind
keybind = ctrl+shift+right=unbind keybind = ctrl+shift+right=unbind
# send CSI-u style codes for Ctrl+Shift+H/J/K/L # send CSI-u style codes for Ctrl bindings
keybind = ctrl+shift+h=csi:11~ keybind = ctrl+shift+h=csi:11~
keybind = ctrl+shift+j=csi:12~ keybind = ctrl+shift+j=csi:12~
keybind = ctrl+shift+k=csi:13~ keybind = ctrl+shift+k=csi:13~
keybind = ctrl+shift+l=csi:14~ keybind = ctrl+shift+l=csi:14~
keybind = ctrl+1=csi:15~
keybind = ctrl+2=csi:19~
keybind = ctrl+3=csi:21~
keybind = ctrl+4=csi:23~
keybind = ctrl+5=csi:24~

View file

@ -66,16 +66,13 @@ utils.foreach({
vim.cmd.normal({ cmd }) vim.cmd.normal({ cmd })
end end
end }, end },
{ "<C-t>", ":$tabnew %<CR>", { silent = true }, }, { "<C-t>", ":$tabnew %<CR>", { silent = true }, },
{ "<Leader>1", ":1tabn<CR>", { silent = true }, }, -- These are mapped to C-1 through C-5 in ghostty, sending escape codes for F keys
{ "<Leader>2", ":2tabn<CR>", { silent = true }, }, { "<F5>", ":1tabn<CR>", { silent = true }, },
{ "<Leader>3", ":3tabn<CR>", { silent = true }, }, { "<F8>", ":2tabn<CR>", { silent = true }, },
{ "<Leader>4", ":4tabn<CR>", { silent = true }, }, { "<F10>", ":3tabn<CR>", { silent = true }, },
{ "<Leader>5", ":5tabn<CR>", { silent = true }, }, { "<F11>", ":4tabn<CR>", { silent = true }, },
{ "<Leader>6", ":6tabn<CR>", { silent = true }, }, { "<F12>", ":5tabn<CR>", { silent = true }, },
{ "<Leader>7", ":7tabn<CR>", { silent = true }, },
{ "<Leader>8", ":8tabn<CR>", { silent = true }, },
{ "<Leader>9", ":9tabn<CR>", { silent = true }, },
} }
}, },
{ {