escape clears search highlights

This commit is contained in:
2026-06-10 14:11:01 +02:00
parent 83a4d3086a
commit 41144f2c76
+3
View File
@@ -1,6 +1,9 @@
local map = vim.keymap.set
local silent = { silent = true }
-- Clear search highlighting on Escape
map("n", "<Esc>", "<cmd>nohlsearch<cr>", silent)
-- Visual line navigation
for _, mode in ipairs({ "n", "v" }) do
map(mode, "j", "gj", silent)