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

Re: highlighting syntax puzzler

Expand Messages
  • drchip@campbellfamily.biz
    ... Perhaps you didn t know that you can have several end patterns. Here s an example: syn region Block matchgroup=Delimiter start= (header. {-})
    Message 1 of 2 , May 4, 2005
    • 0 Attachment
      Quoting Eric Arnold <eric_p_arnold@...>:


      > I have a set of records each of which starts with a header which has it's own
      > syntax breakdown, which works OK. I'm trying to highlight after one header
      > to before the next header, i.e. from "stuff1" to "<marker>" inclusive. The
      > tricky part is that it should highlight conditionally on the presence of
      > the <marker>.
      >
      > (header,field1,f2,f3) stuff1 xxxxxxxx
      > xxxxxxxxxx
      > xxxxxxxxxx <marker>
      > (header,field1,f2,f3) stuff stuff stuff
      > (header,field1,f2,f3) stuff stuff stuff

      Perhaps you didn't know that you can have several end patterns.
      Here's an example:

      syn region Block matchgroup=Delimiter start="(header.\{-})" end="<marker>"
      end="\ze(header"
      hi link Block Special

      Regards,
      Chip Campbell
    Your message has been successfully submitted and would be delivered to recipients shortly.