From 01735f9e25f38fe3f6dbedd4742c778bdb4644ac Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Sun, 4 Sep 2016 23:24:14 +0100 Subject: [PATCH] Add ? to C operator highlighting --- after/syntax/c.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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*('