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

Re: Skipping arbitrary text in syntax regions

Expand Messages
  • Paul Moore
    ... Try looking at the help for the @
    Message 1 of 4 , Aug 23, 2003
      Doug Kearns <djkea2@...> writes:

      > On Fri, Aug 22, 2003 at 09:55:55AM -0700, Keith Roberts wrote:
      >> "start" can be a pattern, so wouldn't this work?
      >> :syn region MyString matchgroup="MyDelimiter"
      >> start="begin\ze.*$" end="finish"
      > Thanks, but this includes the trailing " not special text" as part of
      > the MyString syntax group. I need this to be excluded entirely from the
      > region. Let's say that "not special text" matches as the MyNotSpecial
      > syntax group. I can't have MyString contain MyNotSpecial because "not
      > special text" shouldn't match where "special text" is located - in the
      > region 'body'.
      > So, the question might have been more clearly put as: Is there some way
      > to exclude the "not special text" string after, and on the same line as,
      > begin from the region entirely, so it does not match as part of the
      > MyString or MyDelimiter syntax groups?

      Try looking at the help for the \@<= pattern. I think the following
      does what you are after...

      syn region MyString start="\(begin.*\)\@<=$" end="finish"

      This signature intentionally left blank
    Your message has been successfully submitted and would be delivered to recipients shortly.