replace return to clear highlight with escape

This commit is contained in:
Triston Armstrong 2024-06-29 21:16:31 -04:00
parent 851bdaa611
commit 2cc5e697a9
No known key found for this signature in database
GPG Key ID: FADE6AC6F956FC52

View File

@ -8,7 +8,7 @@ map("n", "<C-c>", "<Esc>")
map("n", "<C-s>", "<cmd>w<CR>")
map("n", "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
map("n", "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
map("n", "<CR>", '{->v:hlsearch ? ":nohl\\<CR>" : "\\<CR>"}()', { expr = true })
map("n", "<Esc>", '{->v:hlsearch ? ":nohl\\<CR>" : "\\<CR>"}()', { expr = true })
map("v", "J", ":m '>+1<CR>gv=gv")
map("v", "K", ":m '<-2<CR>gv=gv")