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

121310Re: Proper handling of C style // comments?

Expand Messages
  • kuru
    Mar 2 2:32 PM
    • 0 Attachment
      Hugh thanks for your time, but that one did not help me ;)

      Christian, that was a great solution. It did do the trick. My c.vim is
      from 2006, I am not using the latest one(from nov 2010 by Bram)
      because the older one is more extended in a way and I already created
      my color file.

      It was called CCommentError, so I diverted it to comment as you have
      suggested.

      Thanks again. that was great work around. it does not take care of the
      root of the problem but it is a great solution





      On Mar 2, 11:49 am, Christian Brabandt <cbli...@...> wrote:
      > Hi kuru!
      >
      > On Mi, 02 M r 2011, kuru wrote:
      >
      > > Currently when ever I open .c files, "//" comment lines show up as
      > > "errors" based on the color syntax. I have tried the latest c.vim from
      > > last November which seems to resolve the issue but that one is
      > > relatively shorter and not as extended as the previous c.vim syntax
      > > file. So I am trying to find the offending lines in the older c.vim
      > > and resolve the mishandling. The only thing is that I am not so
      > > profound with the expressions in the syntax files. And I just cannt
      > > figure out how to fix it.  I am hoping that someone might be able to
      > > help me out here
      >
      > Where did you get this syntax file from? It doesn't happen here with the
      > latest Vim runtime file and also not with Vim 7.2.
      >
      > So you might need to investigate the syntax file. On the
      > //-comment line, enter the following line:
      > :echomsg synIDattr(synID(line("."), col("."), 1), "name")
      > It should output something like cComment
      > Now open the syntax file and search for that item. There should be a
      > line like this:
      > hi def link cComment <item>
      >
      > Now in your .vimrc  put this:
      > " Fix annoying // Comments in C files:
      > hi link cComment Comment
      >
      > regards,
      > Christian

      --
      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 8 messages in this topic