i have a mapping that will toggle search highlighting on and off. you may find it useful. map <F3> :set hlsearch! <CR>
-- chad On Mon, Apr 02, 2007 at 12:43:07PM -0400, Jean-Rene David wrote: > * shawn bright [2007.04.02 12:00]: > > when i do a search like /text > > it highlights all of the matches and i can use n > > and N to navigate. how do i turn the > > highlighting off when i am done? > > There's a command to do exactly that: > > :nohlsearch > > This will turn off highlighting for the current > search. Highlighting will come back for the next > search. > > Note that this is different from the 'hlsearch' > option, whose effects are permanent. > > Of course you can map this: > > :map <F2> :nohlsearch<CR> > > -- > JR