Dnia pi?tek 19 sierpie? 2005 16:10, Eric Desjardins napisa?:
> I do not know if it is possible or how to do it but it would be nice if
> we could start another search in vim using a different highlight colour.
AFAIK there is script for this on http://www.vim.org
The world really isn't any worse.
It's just that the news coverage is so much better.
> I do not know if it is possible or how to do it but it would
> be nice if we could start another search in vim using a
> different highlight colour.
If I understand what you're asking, you want to highlight
successive matches with different colors. An easy solution that
comes to mind is to make use of the two diff. coloring groups,
"Search" and "IncSearch". Then, if you have both 'hls' and
'incsearch' set, it will highlight your last match in "Search"
colors, and your current (first) match in "IncSearch".
With a bit more chicanery, one might be able to have a rotating
list of colors, creating highlight groups on the fly based on the
contents of the @/ register.
This would likely involve an exec() call, after building a "syn
match" statement or a call to ":match". If you only want the
most recent search (that is, two levels of searching), something
like this might work nicely in conjunction with having 'hls' set: