29 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			VimL
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			VimL
		
	
	
	
	
	
" Language: C++
 | 
						|
" Description: Additional C++ syntax file.
 | 
						|
" Author: Kenneth Benzie (Benie) k.benzie83@gmail.com
 | 
						|
" Last Modified: September 04, 2016
 | 
						|
 | 
						|
" Match delimiter expressions: <expr>, ex::pr
 | 
						|
"                              ^    ^    ^^
 | 
						|
syn match cppDelimiter '\(<\|>\|::\)'
 | 
						|
" Match keyword logic operators
 | 
						|
syn keyword cppOperator and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq
 | 
						|
" Match keyword operators
 | 
						|
syn keyword cppOperator alignas alignof decltype
 | 
						|
" Match single character operators if they are surrounded by white space: / < >
 | 
						|
"                                                                         ^ ^ ^
 | 
						|
syn match cppOperator '\(\s\zs\/\s\ze\|\s\zs<\s\ze\|\s\zs>\s\ze\)'
 | 
						|
" Match nested namespace expressions: expr::
 | 
						|
"                                     ^^^^
 | 
						|
syn match cppStorageClass '\w[A-Za-z0-9_]*\ze::'
 | 
						|
" " Match multi character operators, override cppDelimiter matches for < >
 | 
						|
" "                                                                    ^ ^
 | 
						|
syn match cppOperator '\(<<\|>>\|>>=\|<<=\|<=\|>=\|->\*\|->\)'
 | 
						|
 | 
						|
" Define additional highlight groups
 | 
						|
hi default link cppDelimiter Delimiter
 | 
						|
 | 
						|
" Override default highlight groups
 | 
						|
hi link cppCast Operator
 | 
						|
hi link cppModifier Statement
 |