From 56ee024b1f37549b7025e9fe762c1f280f31df42 Mon Sep 17 00:00:00 2001 From: Stefan Weigl-Bosker Date: Thu, 22 May 2025 23:30:27 -0400 Subject: `modules/neovim`: allow tmux/nvim split navigation in terminal and insert modes --- modules/neovim/nvim/lua/config/keybinds.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'modules/neovim') 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('wi', '', { desc = "Focus window right of the current one -- nmap('', '', { desc = "Focus window below the current one" }) -- nmap('', '', { desc = "Focus window above the current one" }) -- nmap('', '', { desc = "Focus window right of the current one" }) -nmap('', function() require("tmux").move_left() end, { desc = "Focus window left of the current one" }) -nmap('', function() require("tmux").move_bottom() end, { desc = "Focus window below the current one" }) -nmap('', function() require("tmux").move_top() end, { desc = "Focus window above the current one" }) -nmap('', function() require("tmux").move_right() end, { desc = "Focus window right of the current one" }) -nmap('', function() require("tmux").resize_left() end, { desc = "Resize left side of split" }) -nmap('', function() require("tmux").resize_bottom() end, { desc = "Resize bottom side of split" }) -nmap('', function() require("tmux").resize_top() end, { desc = "Resize top side of split" }) -nmap('', function() require("tmux").resize_right() end, { desc = "Resize right side of split" }) +map({'n', 't', 'i'}, '', function() require("tmux").move_left() end, { desc = "Focus window left of the current one" }) +map({'n', 't', 'i'}, '', function() require("tmux").move_bottom() end, { desc = "Focus window below the current one" }) +map({'n', 't', 'i'}, '', function() require("tmux").move_top() end, { desc = "Focus window above the current one" }) +map({'n', 't', 'i'}, '', function() require("tmux").move_right() end, { desc = "Focus window right of the current one" }) +map({'n', 't', 'i'}, '', function() require("tmux").resize_left() end, { desc = "Resize left side of split" }) +map({'n', 't', 'i'}, '', function() require("tmux").resize_bottom() end, { desc = "Resize bottom side of split" }) +map({'n', 't', 'i'}, '', function() require("tmux").resize_top() end, { desc = "Resize top side of split" }) +map({'n', 't', 'i'}, '', function() require("tmux").resize_right() end, { desc = "Resize right side of split" }) -- nmap('fo', 'Telescope find_files', { silent = true }) nmap('fo', 'FzfLua files', { silent = true }) -- cgit v1.2.3