16 lines
782 B
Lua
16 lines
782 B
Lua
-- [[ Basic Keymaps ]]
|
|
|
|
-- Clear highlights on search when pressing <Esc> in normal mode
|
|
-- See `:help hlsearch`
|
|
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
|
|
|
|
-- Keybinds to make split navigation easier.
|
|
-- 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' })
|
|
|
|
vim.keymap.set('i', '<Esc>', '<C-c>', { noremap = true })
|
|
vim.keymap.set('n', '<Esc>', '<C-c>', { noremap = true }) |