aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Weigl-Bosker <stefan@s00.xyz>2025-05-22 23:30:27 -0400
committerStefan Weigl-Bosker <stefan@s00.xyz>2025-05-22 23:30:27 -0400
commit56ee024b1f37549b7025e9fe762c1f280f31df42 (patch)
treea5336d51fce2d8c923c879bf27542b50cd85b2b2
parente430d30bd8a2c3da5e73d13c5bb26f25e2483dd6 (diff)
downloadhome-56ee024b1f37549b7025e9fe762c1f280f31df42.tar.gz
`modules/neovim`: allow tmux/nvim split navigation in terminal and insert modes
-rw-r--r--modules/neovim/nvim/lua/config/keybinds.lua16
1 files changed, 8 insertions, 8 deletions
diff --git a/modules/neovim/nvim/lua/config/keybinds.lua b/modules/neovim/nvim/lua/config/keybinds.lua
index e2ec96e..4f8df1b 100644
--- a/modules/neovim/nvim/lua/config/keybinds.lua
+++ b/modules/neovim/nvim/lua/config/keybinds.lua
@@ -41,14 +41,14 @@ nmap('<leader>wi', '<C-w><C-l>', { desc = "Focus window right of the current one
-- nmap('<C-n>', '<C-w><C-j>', { desc = "Focus window below the current one" })
-- nmap('<C-e>', '<C-w><C-k>', { desc = "Focus window above the current one" })
-- nmap('<C-i>', '<C-w><C-l>', { desc = "Focus window right of the current one" })
-nmap('<M-m>', function() require("tmux").move_left() end, { desc = "Focus window left of the current one" })
-nmap('<M-n>', function() require("tmux").move_bottom() end, { desc = "Focus window below the current one" })
-nmap('<M-e>', function() require("tmux").move_top() end, { desc = "Focus window above the current one" })
-nmap('<M-i>', function() require("tmux").move_right() end, { desc = "Focus window right of the current one" })
-nmap('<M-M>', function() require("tmux").resize_left() end, { desc = "Resize left side of split" })
-nmap('<M-N>', function() require("tmux").resize_bottom() end, { desc = "Resize bottom side of split" })
-nmap('<M-E>', function() require("tmux").resize_top() end, { desc = "Resize top side of split" })
-nmap('<M-I>', function() require("tmux").resize_right() end, { desc = "Resize right side of split" })
+map({'n', 't', 'i'}, '<M-m>', function() require("tmux").move_left() end, { desc = "Focus window left of the current one" })
+map({'n', 't', 'i'}, '<M-n>', function() require("tmux").move_bottom() end, { desc = "Focus window below the current one" })
+map({'n', 't', 'i'}, '<M-e>', function() require("tmux").move_top() end, { desc = "Focus window above the current one" })
+map({'n', 't', 'i'}, '<M-i>', function() require("tmux").move_right() end, { desc = "Focus window right of the current one" })
+map({'n', 't', 'i'}, '<M-M>', function() require("tmux").resize_left() end, { desc = "Resize left side of split" })
+map({'n', 't', 'i'}, '<M-N>', function() require("tmux").resize_bottom() end, { desc = "Resize bottom side of split" })
+map({'n', 't', 'i'}, '<M-E>', function() require("tmux").resize_top() end, { desc = "Resize top side of split" })
+map({'n', 't', 'i'}, '<M-I>', function() require("tmux").resize_right() end, { desc = "Resize right side of split" })
-- nmap('<leader>fo', '<cmd>Telescope find_files<CR>', { silent = true })
nmap('<leader>fo', '<cmd>FzfLua files<CR>', { silent = true })