Make room for window manager shortcuts

This commit is contained in:
Martin Pander
2026-02-19 16:26:44 +01:00
parent c8e7799db2
commit f87d3eb2e4
2 changed files with 16 additions and 16 deletions

View File

@@ -27,11 +27,11 @@ in
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'" | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n M-K if-shell "$is_vim" "send-keys M-K" "if -F \"#{pane_at_top}\" \"switch-client -p\" \"select-pane -U\"" bind-key -n C-M-k if-shell "$is_vim" "send-keys C-M-k" "if -F \"#{pane_at_top}\" \"switch-client -p\" \"select-pane -U\""
bind-key -n M-J if-shell "$is_vim" "send-keys M-J" "if -F \"#{pane_at_bottom}\" \"switch-client -n\" \"select-pane -D\"" bind-key -n C-M-j if-shell "$is_vim" "send-keys C-M-j" "if -F \"#{pane_at_bottom}\" \"switch-client -n\" \"select-pane -D\""
bind-key -n M-L if-shell "$is_vim" "send-keys M-L" "if -F \"#{pane_at_right}\" \"next-window\" \"select-pane -R\"" bind-key -n C-M-l if-shell "$is_vim" "send-keys C-M-l" "if -F \"#{pane_at_right}\" \"next-window\" \"select-pane -R\""
bind-key -n M-H if-shell "$is_vim" "send-keys M-H" "if -F \"#{pane_at_left}\" \"previous-window\" \"select-pane -L\"" bind-key -n C-M-h if-shell "$is_vim" "send-keys C-M-h" "if -F \"#{pane_at_left}\" \"previous-window\" \"select-pane -L\""
bind '"' split-window -c "#{pane_current_path}" bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}" bind % split-window -h -c "#{pane_current_path}"

View File

@@ -4,14 +4,14 @@ vim.g.mapleader = " "
vim.keymap.set({'n', 'v'}, 'j', 'gj', {}) vim.keymap.set({'n', 'v'}, 'j', 'gj', {})
vim.keymap.set({'n', 'v'}, 'k', 'gk', {}) vim.keymap.set({'n', 'v'}, 'k', 'gk', {})
vim.keymap.set('n', '<C-M-h>', '<C-w>h', {}) -- vim.keymap.set('n', '<C-M-h>', '<C-w>h', {})
vim.keymap.set('n', '<C-M-j>', '<C-w>j', {}) -- vim.keymap.set('n', '<C-M-j>', '<C-w>j', {})
vim.keymap.set('n', '<C-M-k>', '<C-w>k', {}) -- vim.keymap.set('n', '<C-M-k>', '<C-w>k', {})
vim.keymap.set('n', '<C-M-l>', '<C-w>l', {}) -- vim.keymap.set('n', '<C-M-l>', '<C-w>l', {})
vim.keymap.set('t', '<C-M-h>', '<C-\\><C-n><C-w>h', {}) -- vim.keymap.set('t', '<C-M-h>', '<C-\\><C-n><C-w>h', {})
vim.keymap.set('t', '<C-M-j>', '<C-\\><C-n><C-w>j', {}) -- vim.keymap.set('t', '<C-M-j>', '<C-\\><C-n><C-w>j', {})
vim.keymap.set('t', '<C-M-k>', '<C-\\><C-n><C-w>k', {}) -- vim.keymap.set('t', '<C-M-k>', '<C-\\><C-n><C-w>k', {})
vim.keymap.set('t', '<C-M-l>', '<C-\\><C-n><C-w>l', {}) -- vim.keymap.set('t', '<C-M-l>', '<C-\\><C-n><C-w>l', {})
vim.keymap.set('n', '<leader>zm', '<C-W>_<C-W>|', { noremap = true, silent = true }) vim.keymap.set('n', '<leader>zm', '<C-W>_<C-W>|', { noremap = true, silent = true })
vim.keymap.set('n', '<C-M-Y>', '<C-w>5<', {}) vim.keymap.set('n', '<C-M-Y>', '<C-w>5<', {})
vim.keymap.set('n', '<C-M-U>', '<C-w>5+', {}) vim.keymap.set('n', '<C-M-U>', '<C-w>5+', {})
@@ -162,8 +162,8 @@ local function tmux_navigate(direction)
end end
end end
vim.keymap.set('n', '<M-H>', function() tmux_navigate('h') end) vim.keymap.set('n', '<C-M-h>', function() tmux_navigate('h') end)
vim.keymap.set('n', '<M-J>', function() tmux_navigate('j') end) vim.keymap.set('n', '<C-M-j>', function() tmux_navigate('j') end)
vim.keymap.set('n', '<M-K>', function() tmux_navigate('k') end) vim.keymap.set('n', '<C-M-k>', function() tmux_navigate('k') end)
vim.keymap.set('n', '<M-L>', function() tmux_navigate('l') end) vim.keymap.set('n', '<C-M-l>', function() tmux_navigate('l') end)