073263
" Vim syntax file
073263
" Language: C++
073263
" Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp)
073263
" Previous Maintainer: Ken Shan <ccshan@post.harvard.edu>
073263
" Last Change: 2015 Mar 1
073263
" For version 5.x: Clear all syntax items
073263
" For version 6.x: Quit when a syntax file was already loaded
073263
if version < 600
073263
syntax clear
073263
elseif exists("b:current_syntax")
073263
finish
073263
endif
073263
" Read the C syntax to start with
073263
if version < 600
073263
so <sfile>:p:h/c.vim
073263
else
073263
runtime! syntax/c.vim
073263
unlet b:current_syntax
073263
endif
073263
" C++ extensions
073263
syn keyword cppStatement new delete this friend using
073263
syn keyword cppAccess public protected private
073263
syn keyword cppType inline virtual explicit export bool wchar_t
073263
syn keyword cppExceptions throw try catch
073263
syn keyword cppOperator operator typeid
073263
syn keyword cppOperator and bitor or xor compl bitand and_eq or_eq xor_eq not not_eq
073263
syn match cppCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*<"me=e-1
073263
syn match cppCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*$"
073263
syn keyword cppStorageClass mutable
073263
syn keyword cppStructure class typename template namespace
073263
syn keyword cppBoolean true false
073263
syn keyword cppConstant __cplusplus
073263
" C++ 11 extensions
073263
if !exists("cpp_no_cpp11")
073263
syn keyword cppType override final
073263
syn keyword cppExceptions noexcept
073263
syn keyword cppStorageClass constexpr decltype thread_local
073263
syn keyword cppConstant nullptr
073263
syn keyword cppConstant ATOMIC_FLAG_INIT ATOMIC_VAR_INIT
073263
syn keyword cppConstant ATOMIC_BOOL_LOCK_FREE ATOMIC_CHAR_LOCK_FREE
073263
syn keyword cppConstant ATOMIC_CHAR16_T_LOCK_FREE ATOMIC_CHAR32_T_LOCK_FREE
073263
syn keyword cppConstant ATOMIC_WCHAR_T_LOCK_FREE ATOMIC_SHORT_LOCK_FREE
073263
syn keyword cppConstant ATOMIC_INT_LOCK_FREE ATOMIC_LONG_LOCK_FREE
073263
syn keyword cppConstant ATOMIC_LLONG_LOCK_FREE ATOMIC_POINTER_LOCK_FREE
073263
syn region cppRawString matchgroup=cppRawDelimiter start=+\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(+ end=+)\z1"+ contains=@Spell
073263
endif
073263
" The minimum and maximum operators in GNU C++
073263
syn match cppMinMax "[<>]?"
073263
" Default highlighting
073263
if version >= 508 || !exists("did_cpp_syntax_inits")
073263
if version < 508
073263
let did_cpp_syntax_inits = 1
073263
command -nargs=+ HiLink hi link <args>
073263
else
073263
command -nargs=+ HiLink hi def link <args>
073263
endif
073263
HiLink cppAccess cppStatement
073263
HiLink cppCast cppStatement
073263
HiLink cppExceptions Exception
073263
HiLink cppOperator Operator
073263
HiLink cppStatement Statement
073263
HiLink cppType Type
073263
HiLink cppStorageClass StorageClass
073263
HiLink cppStructure Structure
073263
HiLink cppBoolean Boolean
073263
HiLink cppConstant Constant
073263
HiLink cppRawDelimiter Delimiter
073263
HiLink cppRawString String
073263
delcommand HiLink
073263
endif
073263
let b:current_syntax = "cpp"
073263
" vim: ts=8