diff options
feat: add keybinding to reset search highlight
Diffstat (limited to 'lua/config/options.lua')
-rw-r--r-- | lua/config/options.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lua/config/options.lua b/lua/config/options.lua index 4bdfe21..0b301ee 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -50,5 +50,8 @@ map({ "n", "v" }, "gl", "$", { desc = "Last char in line" }) map({ "n", "v" }, "gm", "%", { desc = "Matching bracket" }) -- Make NeoVim open folds when searching -map("n", "n", "nzzzv", { desc = 'Next Search Result' }) -map("n", "N", "Nzzzv", { desc = 'Previous Search Result' }) +map("n", "n", "nzzzv", { desc = "Next Search Result" }) +map("n", "N", "Nzzzv", { desc = "Previous Search Result" }) + +-- Reset search highlight on ESC +map("n", "<Esc>", "<cmd>nohlsearch<CR>", { desc = "Reset search highlight" }) |