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

129421Re: creating syntax file - syn match problem

Expand Messages
  • Ben Fritz
    Mar 5, 2012
    • 0 Attachment
      On Mar 4, 10:55 am, Tarlika Elisabeth Schmitz
      <v...@...> wrote:
      >
      > This virtually does what I want:
      >
      > syn region  xyzCode matchgroup=xyzCodeMark start='{{{' end='}}}'
      > syn region  xyzCode matchgroup=xyzCodeMark start='{{{{' end='}}}}'
      >
      > with one exception:
      > When the code block is started with more than 3 braces, the opening set
      > of braces must be followed by [spaces] and a new line. The code has to
      > be placed on the next line. The closing braces can be on the same line
      > as the last code.
      >

      As I suggested before, use a zero-width match, or even better a \ze:

      syn region xyzCode matchgroup=xyzCodeMark start='{{{{\ze\s*$'
      end='}}}}'

      :he /\ze
      :he zero-width (not used but it could have been)

      --
      You received this message from the "vim_use" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    • Show all 9 messages in this topic