8000 cpp.vim: Add raw string highlighting. · vim-jp/vim-cpp@bc54412 · GitHub
[go: up one dir, main page]

Skip to content

Commit bc54412

Browse files
committed
cpp.vim: Add raw string highlighting.
1 parent ecc8719 commit bc54412

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

syntax/cpp.vim

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ if !exists("cpp_no_cpp11")
4646
syn keyword cppConstant ATOMIC_WCHAR_T_IS_LOCK_FREE ATOMIC_SHORT_IS_LOCK_FREE
4747
syn keyword cppConstant ATOMIC_INT_IS_LOCK_FREE ATOMIC_LONG_IS_LOCK_FREE
4848
syn keyword cppConstant ATOMIC_LLONG_IS_LOCK_FREE ATOMIC_POINTER_IS_LOCK_FREE
49+
50+
" A raw-string looks like R"d(...)d" where d is a (possibly empty) sequence of
51+
" A-Z a-z 0-9 _ { } [ ] # < > % : ; . ? * + - / ^ & | ~ ! = , " '
52+
syn region cppRawString matchgroup=cppRawDelim start=+R"\z([[:alnum:]_{}[\]#<>%:;.?*+\-/\^&|~!=,"']*\)(+ end=+)\z1"+ contains=@Spell
4953
endif
5054

5155
" The minimum and maximum operators in GNU C++
@@ -69,6 +73,8 @@ if version >= 508 || !exists("did_cpp_syntax_inits")
6973
HiLink cppStructure Structure
7074
HiLink cppBoolean Boolean
7175
HiLink cppConstant Constant
76+
HiLink cppRawDelim cFormat
77+
HiLink cppRawString String
7278
delcommand HiLink
7379
endif
7480

0 commit comments

Comments
 (0)
0