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

Re: Help with VIM syntax region regex please....

Expand Messages
  • wombatvvv
    Yes, that is correct. If I explain a bit, it may make my intentions clearer. What I am writing is a syntax file the does rainbow code colouring for different
    Message 1 of 4 , Jan 2, 2012
    • 0 Attachment
      Yes, that is correct.

      If I explain a bit, it may make my intentions clearer. What I am writing is
      a syntax file the does "rainbow" code colouring for different code-blocks as
      well as different bracket levels. It's been complex, but it almost works.
      This is one of the last issues I have to resolve.

      * http://vicwebster.net/images/screen-code.gif Here is a screenshot *
      demonstrating how it looks at the moment. The problem is, that if the
      if-statements (or for/try/catch/whatever-statements) are only one-liners,
      this will screw everything up, as the highlighting will be looking for an
      opening { symbol.

      I will experiment with your syntax match idea.

      Thanks very much for helping.




      --
      View this message in context: http://vim.1045645.n5.nabble.com/Help-with-VIM-syntax-region-regex-please-tp5113772p5115512.html
      Sent from the Vim - General mailing list archive at Nabble.com.

      --
      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
    • wombatvvv
      Actually, don t worry about. I went with a simpler solution that probably makes more sense anyway. (If, while, for, etc. block-headings are highlighted the
      Message 2 of 4 , Jan 2, 2012
      • 0 Attachment
        Actually, don't worry about.

        I went with a simpler solution that probably makes more sense anyway. (If,
        while, for, etc. block-headings are highlighted the same colours as their
        containing block, not a new one).

        * http://vicwebster.net/images/screen-code2.gif Screenshot here * if you're
        interested. As you can see, it works both with "one-line" if statements, as
        well as "block" if statements.

        BTW, I am making it for all C-style languages. It works for PHP and
        JavaScript and I can't see any reason it wouldn't work for C++,C, Java, etc.
        I guess it depends what you like. I showed it to some colleagues who didn't
        like it. But for me personally, I find it hugely more useful to have
        different levels of blocks & brackets highlighted than a variable or an
        operator (I can clearly see what they are no matter what colour they are!).

        ;)

        Thanks for your help.

        --
        View this message in context: http://vim.1045645.n5.nabble.com/Help-with-VIM-syntax-region-regex-please-tp5113772p5115577.html
        Sent from the Vim - General mailing list archive at Nabble.com.

        --
        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
      Your message has been successfully submitted and would be delivered to recipients shortly.