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

110235Re: how to match a "," that IS NOT in comment

Expand Messages
  • Gary
    Dec 14, 2009
    • 0 Attachment
      By the fact that you mention ":match ...", may I assume you're
      defining rules in a syntax file?
      If so, you should be able to do what you want using 'contained' --
      i.e., make sure that "match Error" is flagged with "contained", and
      not contained in the comment group, but is contained in other(s);
      possibly using ALLBUT.

      -gary

      On Dec 12, 3:38 am, aj3423 <aj3...@...> wrote:
      > var a = {
      >         b: 20,
      >         c: 30,
      >         //d:45,
      >         /*e:70,
      >
      >         */
      >
      > }
      >
      > :match Error /,/
      > this can match all the 4 commas, how can I exclude the comma in
      > comment(start with // or wrapped in /* */ )?
      > Thanks.
      >
      > --
      > View this message in context:http://old.nabble.com/how-to-match-a-%22%2C%22-that-IS-NOT-in-comment...
      > Sent from the Vim - General mailing list archive at Nabble.com.

      --
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
    • Show all 6 messages in this topic