Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

After I searched for a text with a pattern, all the matched text stays highlighted. How do I turn off the highlighting temporarily/permanently?

0
Posted

After I searched for a text with a pattern, all the matched text stays highlighted. How do I turn off the highlighting temporarily/permanently?

0

‘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

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.