1
" Vim syntax file
2
"
3
" This file adds C++11 support to cpp.vim,
4
" put it in ~/.vim/after/syntax/cpp.vim
5
6
" C++11 extensions
7
syn keyword cppType		final constexpr
8
syn keyword cppExceptions	noexcept
9
syn keyword cppOperator		decltype
10
syn keyword cppStorageClass	thread_local
11
syn keyword cppConstant		nullptr
12
13
" A raw-string looks like R"d(...)d" where d is a (possibly empty) sequence of
14
" A-Z a-z 0-9 _ { } [ ] # < > % : ; . ? * + - / ^ & | ~ ! = , " '
15
syn region cppRawString  matchgroup=cppRawDelim start=+R"\z([[:alnum:]_{}[\]#<>%:;.?*+\-/\^&|~!=,"']*\)(+ end=+)\z1"+ contains=@Spell
16
17
" Default highlighting
18
if version >= 508 || !exists("did_cpp11_syntax_inits")
19
  if version < 508
20
    let did_cpp11_syntax_inits = 1
21
    command -nargs=+ HiLink hi link <args>
22
  else
23
    command -nargs=+ HiLink hi def link <args>
24
  endif
25
  HiLink cppConstant		Constant
26
  HiLink cppRawDelim		cFormat
27
  HiLink cppRawString		String
28
  delcommand HiLink
29
endif
30
31
" vim: ts=8 noet