October 2015
Intermediate to advanced
356 pages
7h 54m
English
| Tip 81 | Highlight Search Matches |
Vim can highlight search matches, but this feature is not enabled by default. Learn how to enable it, and (just as importantly) how to mute it for those times when the highlighting takes over.
The search command allows us to jump quickly between matches, but by default, Vim does nothing to make them stand out visually. We can fix this by enabling the ‘hlsearch’ option, (see 'hlsearch'ⓘ), which causes all matches to be highlighted throughout the active document as well as in any other open split windows.
Search highlighting is a useful feature, but sometimes it can make itself unwelcome. If we search for a common string, for example, or a pattern with hundreds of matches, we’ll soon ...