Open nullromo opened 5 months ago
After searching (/) and navigating (n/N), some users want the highlighting to go away.
Keep the highlighting around (like vim does by default), but then disable it (call :noh) when the cursor is moved.
:noh
This should be settable via a plugin option and should also be toggleable (enable/disable/toggle) in real time with commands.
Reference plugin for non-neovim
Reference implementation
I currently use <C-/> for this:
<C-/>
-- Use <C-/> as a shortcut for :nohlsearch to hide the search highlighting vim.keymap.set('n', '<C-/>', function() vim.cmd.nohlsearch() end)
Problem
After searching (/) and navigating (n/N), some users want the highlighting to go away.
Solution
Keep the highlighting around (like vim does by default), but then disable it (call
:noh
) when the cursor is moved.Features
This should be settable via a plugin option and should also be toggleable (enable/disable/toggle) in real time with commands.
References
Reference plugin for non-neovim
Reference implementation