nvim: keymappings: Make Esc cancel highlight search as well

This commit is contained in:
Sanchayan Maity 2022-02-01 18:04:48 +05:30
parent d4a4c49d10
commit 73ceafcda2
1 changed files with 1 additions and 0 deletions

View File

@ -3,6 +3,7 @@ local expr_opts = { noremap=true, unique=true, expr=true }
local opts = { noremap=true, unique=true }
remap('c', '<Esc>', '<C-C>', opts)
remap('n', '<Esc>', '<Esc>:noh<CR>', opts)
-- Use Q to execute default register.
remap('n', 'Q', '<Nop>', opts)
-- Copy to clipboard