Re: weird behaviour of hlsearch option
- On 6/29/05, Jürgen Krämer <jkr@...> wrote:
>That pretty much explains it. Thanks for the reply.
> Kamaraju Kusumanchi wrote:
> > May be this is the intended behaviour. But I am finding it a bit intriguing.
> > $cat temp
> > vim vimmers
> > $gvim -u NONE -U NONE temp
> > :set hlsearch
> > /vimmers\|vim
> > Then both the words in the file are completely highlighted. But If I do
> > /vim\|vimmers
> > Then only the vim part of vimmers is higlighted. Logically speaking,
> > both search patterns are same. So :hlsearch should highlight the same
> > area in both the cases. Is this a bug or feature?
> welld-defined behaviour. From ':help /\|'
> | */bar* */\bar* */pattern*
> | 1. A pattern is one or more branches, separated by "\|". It matches anything
> | that matches one of the branches. Example: "foo\|beep" matches "foo" and
> | matches "beep". If more than one branch matches, the first one is used.