Obey cpp options in c syntax file

This commit is contained in:
Kenneth Benzie 2017-07-26 00:30:13 +01:00
parent 4f232a0f2d
commit 5f08372d83

View File

@ -1,7 +1,7 @@
" Language: C " Language: C
" Description: Additional C syntax file. " Description: Additional C syntax file.
if !exists('c_no_function') if !exists('c_no_function') && !exists('cpp_no_function')
" Match function expressions: expr() " Match function expressions: expr()
" ^^^^ " ^^^^
syn match cFunction '\h\w*\ze\s*(' display syn match cFunction '\h\w*\ze\s*(' display
@ -9,7 +9,7 @@ if !exists('c_no_function')
hi default link cFunction Function hi default link cFunction Function
endif endif
if !exists('c_no_delimiters') if !exists('c_no_delimiters') && !exists('cpp_no_delimiters')
" Match delimiter expressions: (expr) {expr} ; " Match delimiter expressions: (expr) {expr} ;
" ^ ^ ^ ^ ^ " ^ ^ ^ ^ ^
syn match cDelimiter '[()\[\];:]' display syn match cDelimiter '[()\[\];:]' display
@ -21,7 +21,7 @@ if !exists('c_no_delimiters')
hi default link cDelimiter cUserCont hi default link cDelimiter cUserCont
endif endif
if !exists('c_no_operators') if !exists('c_no_operators') && !exists('cpp_no_operators')
" Match: * - . ^ ~ + - , & | ! % ? < > order is important " Match: * - . ^ ~ + - , & | ! % ? < > order is important
" ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ " ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
syn match cOperator '[\*=\.\^\~+\-,&|!%?><]' display syn match cOperator '[\*=\.\^\~+\-,&|!%?><]' display