aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--neovim/.config/nvim/lua/config/keymaps.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/neovim/.config/nvim/lua/config/keymaps.lua b/neovim/.config/nvim/lua/config/keymaps.lua
index f0bfbec..66e97a0 100644
--- a/neovim/.config/nvim/lua/config/keymaps.lua
+++ b/neovim/.config/nvim/lua/config/keymaps.lua
@@ -1,10 +1,18 @@
1local map = vim.keymap.set 1local map = vim.keymap.set
2 2
3-- Switch windows with <C-[direction]> 3-- Switch windows with <C-[direction]>, from Normal mode or from inside a
4-- terminal buffer (e.g. claude-code.nvim's split) without leaving it first.
5-- Terminal mode passes keys straight to the running process by default, so
6-- <C-w><direction> alone never reaches Neovim there - <C-\><C-n> escapes to
7-- Normal mode before running the window command.
4map("n", "<C-j>", "<C-w>j") 8map("n", "<C-j>", "<C-w>j")
5map("n", "<C-k>", "<C-w>k") 9map("n", "<C-k>", "<C-w>k")
6map("n", "<C-h>", "<C-w>h") 10map("n", "<C-h>", "<C-w>h")
7map("n", "<C-l>", "<C-w>l") 11map("n", "<C-l>", "<C-w>l")
12map("t", "<C-j>", [[<C-\><C-n><C-w>j]])
13map("t", "<C-k>", [[<C-\><C-n><C-w>k]])
14map("t", "<C-h>", [[<C-\><C-n><C-w>h]])
15map("t", "<C-l>", [[<C-\><C-n><C-w>l]])
8 16
9-- Never use the arrow keys 17-- Never use the arrow keys
10for _, key in ipairs({ "<Up>", "<Down>", "<Left>", "<Right>" }) do 18for _, key in ipairs({ "<Up>", "<Down>", "<Left>", "<Right>" }) do