Enable folding {} in C/C++ & delimiter highlights
This commit is contained in:
		
							parent
							
								
									ca90c0e098
								
							
						
					
					
						commit
						71edca020e
					
				@ -5,7 +5,7 @@
 | 
			
		||||
 | 
			
		||||
" Match delimiter expressions: (expr) {expr} : ;
 | 
			
		||||
"                              ^    ^ ^    ^ ^ ^
 | 
			
		||||
syn match cDelimiter '[()\[\]{}:;]'
 | 
			
		||||
syn match cDelimiter '[()\[\]:;]'
 | 
			
		||||
" Match single character operators, ordering within the [] is important
 | 
			
		||||
syn match cOperator '[\*=\.\^\~+\-,&|!%?]'
 | 
			
		||||
" 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
 | 
			
		||||
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
 | 
			
		||||
hi default link cDelimiter Delimiter
 | 
			
		||||
hi default link cFunction Function
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user