Enable folding {} in C/C++ & delimiter highlights
This commit is contained in:
parent
0bc30ad5c9
commit
657a029acc
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
" Match delimiter expressions: (expr) {expr} : ;
|
" Match delimiter expressions: (expr) {expr} : ;
|
||||||
" ^ ^ ^ ^ ^ ^
|
" ^ ^ ^ ^ ^ ^
|
||||||
syn match cDelimiter '[()\[\]{}:;]'
|
syn match cDelimiter '[()\[\]:;]'
|
||||||
" Match single character operators, ordering within the [] is important
|
" Match single character operators, ordering within the [] is important
|
||||||
syn match cOperator '[\*=\.\^\~+\-,&|!%?]'
|
syn match cOperator '[\*=\.\^\~+\-,&|!%?]'
|
||||||
" Match single character operators if they are surrounded by white space: / < >
|
" Match single character operators if they are surrounded by white space: / < >
|
||||||
@ -31,6 +31,12 @@ if g:c_enable_doxygen_highlights
|
|||||||
hi default link cDoxygen SpecialComment
|
hi default link cDoxygen SpecialComment
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" Match curly braces with cDelimiter highlight group
|
||||||
|
syn match cCurlyError "}"
|
||||||
|
syn region cBlock matchgroup=cDelimiter start="{" end="}" contains=ALLBUT,cBadBlock,cCurlyError,@cParenGroup,cErrInParen,cCppParen,cErrInBracket,cCppBracket,@cStringGroup,@Spell fold
|
||||||
|
syn region cBlock matchgroup=cDelimiter start="{" end="}" transparent fold
|
||||||
|
|
||||||
|
|
||||||
" Define additional highlight groups
|
" Define additional highlight groups
|
||||||
hi default link cDelimiter Delimiter
|
hi default link cDelimiter Delimiter
|
||||||
hi default link cFunction Function
|
hi default link cFunction Function
|
||||||
|
Loading…
x
Reference in New Issue
Block a user