[plug] vim undo search

Alastair Irvine alastair at ucc.gu.uwa.edu.au
Tue Apr 1 10:47:21 WST 2008


On Tue, 1 Apr 2008 06:02 am, Deepan wrote:
> Hi All,
> After we search for something in vim using
> /searchterm .. how does one undo the search
> highlighting. I don't want to set the

The Vim online help (options.txt) has this to say about 'hlsearch':
"When you get bored looking at the highlighted matches, you can turn 
it off with |:nohlsearch|. As soon as you use a search command, the 
highlighting comes back."

Put this in your .vimrc to bind the command-mode key sequence "g/":
  map g/ :nohlsearch^M
(make sure you insert an actual Ctrl-M character (using ^V)).

-- 
Alastair Irvine, Warpspace IT <http://www.warpspace.net/>
Business enquiries: 1300 881744 or guru at warpspace.net
[Linux Counter user #404151; OpenDocument Format Alliance member]



More information about the plug mailing list