Using the * key searches for the word under the cursor.
Use # to do the same, backwards.
When search is active, all instances of word appears highlighted. I want to know if is possible to remove the highlight selection.
Using the * key searches for the word under the cursor.
Use # to do the same, backwards.
When search is active, all instances of word appears highlighted. I want to know if is possible to remove the highlight selection.
hlsearch controls this; it can be turned off with :set nohlsearch. This affects all sorts of searches, however, and not just * and #. One could, theoretically, remap * and # to do what they do and then execute :nohlsearch (or :noh) with :nnoremap * * :noh<CR> and :nnoremap # # :noh<CR> to clear highlighting every time a * or # is performed. The highlighting will still flicker, but clear essentially immediately.