[PLUG] stupid vi question

Sandy Herring sandy at herring.org
Sat Jan 31 22:08:02 UTC 2004


On Sat, 31 Jan 2004, Matt Alexander wrote: 
> On Sat, 31 Jan 2004, Brian Quade wrote:
> 
> > I am no vi expert or anything but I use it because it is convenient.  
> > (Actually I use vim.)  But if I accidentally hit the wrong key (the # 
> > key I think), then whatever word the cursor is on turns brown in every 
> > document I ever open with vi from that point onward.  I tried looking in 
> > .viminfo and I did remove all of the search history lines in there but 
> > it didn't work.  Does anyone know how I can turn this feature off 
> > forever or get rid of it or something so that I don't get brown text all 
> > over the screen?
> 
> I don't know off-hand how to permanentaly disable it, but you could always
> just search for something else that doesn't exist:
> 
> /lkjsflkjsdf

In your .vimrc,

    set nohlsearch      ' (aka nohls)

That's the default behavior, so I suspect your .vimrc has

    set hlsearch        ' (aka hls)

As Matt pointed out, you can do a failed search to get rid of the
highlighting on an adhoc basis. You can also,

    :noh

hth,
Sandy
-- 
Sandy Herring, RHCE                        o              sandy at herring.org
Peck of Pickled Pisces               __  o               http://herring.org/
UNIX or Web authoring questions?  |\/ o\  o  http://herring.org/finger.html
->http://herring.org/techie.html  |/\__/     http://herring.org/pub-key.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.pdxlinux.org/pipermail/plug/attachments/20040131/bd52e7b5/attachment.asc>


More information about the PLUG mailing list