mappings: Use ESC to clear search highlighting and to get out of terminal insert mode

This commit is contained in:
Akianonymus 2021-07-17 09:08:45 +05:30
parent 8be8d36474
commit 72b9fa5018

View File

@ -133,3 +133,9 @@ map("n", "<S-x>", ":bd!<CR>", opt) -- close tab
-- move between tabs
map("n", "<TAB>", [[<Cmd>BufferLineCycleNext<CR>]], opt)
map("n", "<S-TAB>", [[<Cmd>BufferLineCyclePrev<CR>]], opt)
-- use ESC to turn off search highlighting
map("n", "<Esc>", ":noh<CR>", opts)
-- get out of terminal with ESC
map("t", "<Esc>", "<C-\\><C-n>", opts)