I can do <C-O> :noh <CR>it when I enter insert mode, but it does not work when it is executed automatically:
autocmd InsertEnter * :nohlsearch
This works, but it behaves differently:
autocmd InsertEnter * :set nohlsearch
To clarify, I want to start :nohlsearch
if I enter the insert node, but I still want to keep the ability to do / <CR> Nto search for another element.
source
share