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

Re: Regex problem in syntax description [patch]

Expand Messages
  • Bram Moolenaar
    ... That s normal. Since the match depends on where you start looking for the pattern, you need to add something for synchonizing. A simple ... Explanation:
    Message 1 of 6 , Sep 3, 2001
    • 0 Attachment
      Preben Peppe Guldberg wrote:

      > Thus wrote Bram Moolenaar (Bram@...) on [010903]:
      >
      > > Please try this patch. It does work for the example above, but this
      > > code is very complicated, it's hard to predict if there now is another
      > > situation where it fails.
      >
      > For existing text it seems to work just fine.
      >
      > However, when entering new text, the highlighting is only updated if
      > a potentially multiline pattern is matched in a single line.

      That's normal. Since the match depends on where you start looking for
      the pattern, you need to add something for synchonizing. A simple
      solution would be to do:

      :syn sync minlines=20

      Explanation: Vim starts redrawing where you made a change. That's where
      it starts looking for syntax items. Only regions are remembered in the
      cache, not matches.

      --
      TIM: That is not an ordinary rabbit ... 'tis the most foul cruel and
      bad-tempered thing you ever set eyes on.
      ROBIN: You tit. I soiled my armour I was so scared!
      "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

      /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
      ((( Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim )))
      \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
    Your message has been successfully submitted and would be delivered to recipients shortly.