Highlight search terms in vim

Tyler Tyler (266)

By default, vim does not highlight search terms, and it can be difficult to find them in the document.

Posted in these interests:

15 subscribers

While editing a file in vim you can temporarily turn on the highlight search option by typing:

:set hlsearch

To automatically highlight search patterns in vim, first edit your .vimrc file:

vim ~/.vimrc

and then add this line:

set hlsearch