On Jan 30, 11:38 am, Ben Fritz <[email protected]> wrote:
> > > I use the standard C syntax rules, but I have added a couple of rules
> > > in my after/syntax/c.vim file to add some additional syntax folding. I
> > > have narrowed my problem down to the following addition:
>
> > > " add folding of multiline () groups
> > > syn region SynFoldParen
> > > \ start="(" end=")"
> > > \ skip=+"\%(\\"\|[^"]\)\{-}\\\@<!"\|'[^']\{-}'\|'\\''\|//.*+
> > > \ transparent fold keepend extend
> > > \ containedin=ALLBUT,cComment,cCommentL,cString,cCppString
>
> > > Using this addition, with this code::
>
> > > void foo()
> > > {
> > > printf("look how {braces} break highlighting!\n");
> > > }
>
> > > makes the "Constant" highlighting go away after the closing brace
> > > ('}') in the printf statement.
>
> I'm using Vim 7.2.88 from the "Cream" page.
>
> My c.vim syntax file has the following heading:
>
> " Vim syntax file
> " Language: C
> " Maintainer: Bram Moolenaar <[email protected]>
> " Last Change: 2008 Mar 19
>
> I'm using the following c.vim options:
>
> let g:c_syntax_for_h = 1
> let g:c_ansi_typedefs = 1
> let g:c_ansi_constants = 1
>
> I'm sorry about the confusion of the "Constant" group...my colorscheme
> has the following line:
>
> hi link String Constant
>
> c.vim links the cString group to String at line 358.
>
> Everything between the double-quotes in the printf statement except
> for the "\n", on my build with just the standard syntax rules, is
> highlighted as Constant. The "\n" is highlighted as "Special". But,
> the highlighting changes if I introduce that one fold rule so that
> *all* highlighting ends at the closing brace inside the quotes,
> resuming on the next line.
So, anyone able to reproduce it now? I'm still very confused by this
behavior.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---