fixed same commad for terminal mode

This commit is contained in:
a-rossetti 2025-01-17 16:01:24 +01:00
parent fb6be9a8a9
commit 9e8d8426ba
1 changed files with 5 additions and 0 deletions

View File

@ -193,6 +193,11 @@ vim.keymap.set('n', '<C-h>', '<C-w><C-h>', { desc = 'Move focus to the left wind
vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right 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-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' }) vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
-- Same keymaps for terminal mode
vim.keymap.set('t', '<C-h>', [[<C-\><C-n><C-h>]], { desc = 'Move out of terminal mode and focus to the left window' })
vim.keymap.set('t', '<C-l>', [[<C-\><C-n><C-l>]], { desc = 'Move out of terminal mode and focus to the right window' })
vim.keymap.set('t', '<C-j>', [[<C-\><C-n><C-j>]], { desc = 'Move out of terminal mode and focus to the lower window' })
vim.keymap.set('t', '<C-k>', [[<C-\><C-n><C-k>]], { desc = 'Move out of terminal mode and focus to the upper window' })
-- [[ Basic Autocommands ]] -- [[ Basic Autocommands ]]
-- See `:help lua-guide-autocommands` -- See `:help lua-guide-autocommands`