I have in my ~/.vimrc:
set hlsearch
Indeed, when I start searching for a word such as "dude"
/dude
the word "dude" highlights nicely as I start typing "dude" after the slash. However, after I hit enter to signify that I am finished typing in my search, the highlighting goes away, and then I cannot see in my script where the word "dude" occurs. When I hit "n" for next, it takes me to the next occurrence of "dude", but again it is not highlighted.
I am on Mac OS in the terminal using vim.
:hi Search
returns: xxx term=reverse ctermbg=11 guibg=Yellow
What can I do to keep highlighting when I search for the word of interest in vim?
:verbose set hlsearch?say? - glts:verbose set hlsearch?. If there's no output then you haven't:set hlsearchin your vimrc. - glts/?nN::il dudeor even:vim dude % | cw. - romainl