feat: update some keymaps

This commit is contained in:
Radu C. Martin 2025-02-13 19:46:57 +01:00
parent 4d7b16d920
commit baf4d3f400

View file

@ -9,6 +9,16 @@ vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
vim.keymap.set('n', '<leader>ld', vim.diagnostic.open_float, { desc = '[L]ine [D]iagnostic' })
-- Insert --
-- Press jk fast to exit insert mode
vim.keymap.set('i', 'jk', '<ESC>')
vim.keymap.set('i', 'kj', '<ESC>')
-- Visual --
-- Stay in indent mode
vim.keymap.set('v', '<', '<gv^')
vim.keymap.set('v', '>', '>gv^')
-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier
-- for people to discover. Otherwise, you normally need to press <C-\><C-n>, which
-- is not what someone will guess without a bit more experience.