Loading ...
Sorry, an error occurred while loading the content.

Re: weird behaviour of hlsearch option

Expand Messages
  • Kamaraju Kusumanchi
    ... That pretty much explains it. Thanks for the reply. raju
    Message 1 of 3 , Jun 28, 2005
    • 0 Attachment
      On 6/29/05, Jürgen Krämer <jkr@...> wrote:
      >
      > Hi,
      >
      > 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.
      > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      >

      That pretty much explains it. Thanks for the reply.

      raju
    Your message has been successfully submitted and would be delivered to recipients shortly.