diff --git a/after/syntax/c.vim b/after/syntax/c.vim index 50c7f56..44468b2 100644 --- a/after/syntax/c.vim +++ b/after/syntax/c.vim @@ -7,13 +7,14 @@ " ^ ^ ^ ^ ^ ^ syn match cDelimiter '[()\[\]{}:;]' " 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: / < > " ^ ^ ^ syn match cOperator '\(\s\zs\/\s\ze\|\s\zs<\s\ze\|\s\zs>\s\ze\)' " Match multi character operators syn match cOperator '\(+=\|-=\|\*=\|/=\|%=\|\ˆ=\|&=\||=\|<<\|>>\|>>=\)' syn match cOperator '\(<<=\|==\|!=\|<=\|>=\|&&\|||\|++\|--\|->\*\|->\)' +" TODO: Match : in ternary operator as cOperator " Match function expressions: expr() " ^^^^ syn match cFunction '\w[A-Za-z0-9_]*\ze\s*('