ssh specific pane navigation

This commit is contained in:
zolinthecow 2024-11-13 22:45:42 +00:00
parent dcaad68136
commit dfa2256228
1 changed files with 11 additions and 4 deletions

View File

@ -24,10 +24,17 @@ vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' }
-- Use CTRL+<hjkl> to switch between windows
--
-- See `:help wincmd` for a list of all window commands
vim.keymap.set('n', '<C-h>', '<C-w><C-h>', { desc = 'Move focus to the left window' })
vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right window' })
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
if os.getenv 'SSH_CLIENT' then
vim.keymap.set('n', '<C-a>h', '<C-w><C-h>', { desc = 'Move focus to the left window' })
vim.keymap.set('n', '<C-a>l', '<C-w><C-l>', { desc = 'Move focus to the right window' })
vim.keymap.set('n', '<C-a>j', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
vim.keymap.set('n', '<C-a>k', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
else
vim.keymap.set('n', '<C-h>', '<C-w><C-h>', { desc = 'Move focus to the left window' })
vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right window' })
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
end
vim.keymap.set('n', '<leader>ev', vim.cmd.Ex)
vim.keymap.set('v', 'J', ":m '>+1<CR>gv=gv")