Tag Archives: Set highlight

VIM search settings highlight

vim search Settings highlight


When Linux Vim opens the document search string, the Settings are searched to the string and highlighted.

There are two ways:

1. Temporary setting: ViM opens the document –& GT; Command line type
set hlsearch.

Cons: After closing the document, the next time you open it, you need to reset it again.

2. Permanent setting (recommended) : configured in ~/.vIMRC

vim ~/.vimrc

Add Set HLSearch to the file

Then save and exit.

Advantage: once set, permanent effect.