Better Esc mapping

This commit is contained in:
juanmagalhaes 2023-08-14 14:24:15 -03:00
parent 7f49d1d675
commit 6a028150f0
3 changed files with 23 additions and 7 deletions

View file

@ -38,8 +38,13 @@ vim.api.nvim_create_autocmd('TextYankPost', {
pattern = '*',
})
-- Remove highlight search
vim.keymap.set('n', '<leader>l', ':nohls<cr>', { silent = true })
-- Esc functionality
vim.keymap.set("n", "<Esc>", function()
-- Clear terminal notification below
vim.notify("")
-- Removes highlight search
vim.cmd.noh()
end, { silent = true })
-- Split resize
vim.keymap.set('n', '<C-j>', ':res +1<cr>', { desc = 'Resize split' })