On 1/19/07, John Beckett <[EMAIL PROTECTED]> wrote:
Nikolai Weibull wrote:
> Perhaps a better way is to leave 'hlsearch' off and provide a binding
> that toggles it on and off.  That way you don't get the "distracting"
> highlighting until you actually request it.

OK but I imagine most people would like hlsearch on while they
are searching (I certainly do).

Well, hlsearch only kicks in /after/ you've completed your search,
whether you're using 'incsearch' or not.  I once thought this was a
nice feature, but I've realized that I rarely need to have other
matches highlighted.  I mean, either I've found what I want using
'incsearch', or  I have failed to find the text location that I
wanted, and highlighting the other matches won't really help much.
Narrowing your search using 'incsearch' is often a lot quicker than
doing a quick search and pressing 'n' a bunch of times to get to the
right match.

IMHO it is quite idiotic that Vim has the really great feature of
globally highlighting searches, but the user has to learn how to
map keys to make it work in a sensible way. I suppose there
are people who don't mind the distracting highlights once
they've finished looking at them, but I'm pretty confident that
most people here have a mapping to deal with the situation.

Well then, how should it work?

One solution would be to disable it as soon as the mode changes.  That
way it's on while you're looking for matches and is turned of as soon
as you start making changes.

 nikolai

Reply via email to