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

Re: syntax highlighting: how to skip ":" with paranthese

Expand Messages
  • Ben Fritz
    ... So, you re writing a NEW syntax file, correct? ... Sounds like you should just use a syn match command instead of a syn keyword command, then you can
    Message 1 of 3 , Apr 16, 2010
    • 0 Attachment
      On Apr 15, 5:02 am, callpraths <callpra...@...> wrote:
      > Hi,
      > I tried searching the forum for a similar thread but to no avail.
      > I am writing a syntax highlighting file and want recognise
      > const as keyword.

      So, you're writing a NEW syntax file, correct?

      > The problem is that things like
      > const:
      > const:a
      > should also be recognised, but not aconstb.

      Sounds like you should just use a syn match command instead of a syn
      keyword command, then you can construct a regex to use.

      >
      > Now, vim already is clear enough to recognise const( and highlights it. Is
      > there a way of add ":" to the list of parentheses so that this goes through?

      Huh? How did you get it to recognize "const("? In what way does Vim
      "recognize" it? Unless you explicitly add the ( to the highlight rule,
      Vim won't automatically highlight it the same as the "const" before
      it, but you might be seeing some sort of parenthesis-matching behavior.

      --
      You received this message from the "vim_dev" 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

      Subscription settings: http://groups.google.com/group/vim_dev/subscribe?hl=en
    Your message has been successfully submitted and would be delivered to recipients shortly.