| rdfs:comment
| - To highlight all search matches, set the following option: :set hlsearch With the defaults, setting this option causes all text matching the current search to be highlighted using the Search highlight group, which adds a yellow background to the current highlighting. See [help hl-Search], or type :hi Search to see what color you have it set to. You can easily change the default highlighting with, for example, :hi Search guibg=LightBlue. To disable the highlighting temporarily, enter (this is a command, not an option): :nohlsearch :set nohlsearch :nnoremap :nohlsearch
|
| abstract
| - To highlight all search matches, set the following option: :set hlsearch With the defaults, setting this option causes all text matching the current search to be highlighted using the Search highlight group, which adds a yellow background to the current highlighting. See [help hl-Search], or type :hi Search to see what color you have it set to. You can easily change the default highlighting with, for example, :hi Search guibg=LightBlue. To disable the highlighting temporarily, enter (this is a command, not an option): :nohlsearch This command (which can be abbreviated to :noh) removes the highlighting for the current search. The highlighting returns for the next search. If you do this often, put a mapping in your vimrc, like this: " Press Space to turn off highlighting and clear any message already displayed. :nnoremap :nohlsearch:echo To disable highlighting completely, even after a subsequent search, use: :set nohlsearch If you want to be able to enable/disable highlighting quickly, you can map a key to toggle the hlsearch option: " Press F4 to toggle highlighting on/off, and show current value. :noremap :set hlsearch! hlsearch? Or, press return to temporarily get out of the highlighted search. :nnoremap :nohlsearch Highlighting can be enabled on Vim startup, when reading the viminfo file. Add the following to your vimrc if you want Vim to start with no search highlighting: :set viminfo^=h
|