1 " Vim syntax file for Charm++ .ci files
2 " Mostly identical to the C++ syntax file with special keyword additions
4 " To use, add this file to ~/.vim/syntax and add the following
5 " line to ~/.vim/filetype.vim:
6 " au! BufRead,BufNewFile *.ci set filetype=ci
10 elseif exists("b:current_syntax")
14 " Read the C syntax to start with
19 unlet b:current_syntax
22 " C++/Charm extentions
23 syn keyword cppStatement new delete this friend using
24 syn keyword cppStatement serial atomic overlap when publishes connect
25 syn keyword cppAccess public protected private readonly
26 syn keyword cppType inline virtual explicit export bool wchar_t
27 syn keyword cppType entry
28 syn keyword cppExceptions throw try catch
29 syn keyword cppOperator operator typeid
30 syn keyword cppOperator and bitor or xor compl bitand and_eq or_eq xor_eq not not_eq
31 syn match cppCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*<"me=e-1
32 syn match cppCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*$"
33 syn keyword cppStorageClass mutable
34 syn keyword cppStorageClass aggregate threaded sync exclusive nokeep notrace immediate expedited inline local python accel readwrite writeonly accelblock memcritical packed varsize initproc initnode initcall stacksize createhere createhome reductiontarget
35 syn keyword cppStructure class typename template namespace message conditional
36 syn keyword cppStructure mainmodule mainchare module chare array group nodegroup
37 syn keyword cppNumber NPOS
38 syn keyword cppBoolean true false
40 " The minimum and maximum operators in GNU C++
41 syn match cppMinMax "[<>]?"
43 " Default highlighting
44 if version >= 508 || !exists("did_cpp_syntax_inits")
46 let did_cpp_syntax_inits = 1
47 command -nargs=+ HiLink hi link <args>
49 command -nargs=+ HiLink hi def link <args>
51 HiLink cppAccess cppStatement
52 HiLink cppCast cppStatement
53 HiLink cppExceptions Exception
54 HiLink cppOperator Operator
55 HiLink cppStatement Statement
57 HiLink cppStorageClass StorageClass
58 HiLink cppStructure Structure
59 HiLink cppNumber Number
60 HiLink cppBoolean Boolean
64 let b:current_syntax = "cpp"