42047Re: :match and 'hlsearch'
- Mar 1 8:53 PMOn Thu, Mar 02, 2006 at 12:24:17AM +0100, A. J. Mechelynck wrote:
>I like the first suggestion. Perhaps search highlighting could be
> Possibility 1: We already have named autocommand groups. Couldn't we
> have similar (and similarly optional) match groups, thus allowing an
> unlimited number of parallel (named) matches but keeping the present
> behaviour by default (if no matchgroups are used)?
> Possibility 2: Alternately, why stay at a meagre two or three? Let's
> foresee ten of them (:match or :0match, :1match, .. :9match). As my old
> chemistry teacher used to say: "If you want to have enough, make sure
> you have too much."
made part of the :match hierarchy (matchgroup Search). One issue to
consider is priority. If I have
match Search /[aeiou]/
match WarningMsg /[abcde]/
then how does "a" get highlighted? I suggest letting the last-defined
match win. I suspect it is easy to implement; it means that whatever
match I define right now shows its effect immediately; and if
"matchgroup Search" is defined internally, then :match has priority over
hlsearch, so it is backwards compatible.
Bram, once again you have proven that the problem with adding new
features is that we users just ask for more. It is like juggling:
"Wow, you can juggle four! Can you do five?"
HTH --Benji Fisher
- << Previous post in topic Next post in topic >>