After I searched for a text with a pattern, all the matched text stays highlighted. How do I turn off the highlighting temporarily/permanently?
‘hlsearch’ option controls whether all the matches for the last searched pattern are highlighted or not. By default, this option is not enabled. If this option is set in a system-wide vimrc file, then you can turn off the search highlighting by using the following command: :set nohlsearch To temporarily turn off the search highlighting, use :nohlsearch You can also clear the search highlighting, by searching for a pattern that is not in the current file (for example, search for the pattern ‘asdf’). For more information, read :help ‘hlsearch’ :help :nohlsearch 11.2.
Related Questions
- After I searched for a text with a pattern, all the matched text stays highlighted. How do I turn off the highlighting temporarily/permanently?
- This command turns off all region highlighting. Also See section How can I turn off or change highlighted selections?.
- I open a DOC file I know contains highlighted text but the highlighting is gone. What happened?