From 77968bc62738783ae92d17689a17c70b9038ffc9 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Sun, 31 Mar 2013 22:18:40 +0100 Subject: [PATCH 1/1] cpp.vim: Add raw string highlighting. --- syntax/cpp.vim | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/syntax/cpp.vim b/syntax/cpp.vim index 014d227..93cf8f6 100644 --- a/syntax/cpp.vim +++ b/syntax/cpp.vim @@ -46,6 +46,10 @@ if !exists("cpp_no_cpp11") syn keyword cppConstant ATOMIC_WCHAR_T_LOCK_FREE ATOMIC_SHORT_LOCK_FREE syn keyword cppConstant ATOMIC_INT_LOCK_FREE ATOMIC_LONG_LOCK_FREE syn keyword cppConstant ATOMIC_LLONG_LOCK_FREE ATOMIC_POINTER_LOCK_FREE + + " A raw-string looks like R"d(...)d" where d is a (possibly empty) sequence of + " A-Z a-z 0-9 _ { } [ ] # < > % : ; . ? * + - / ^ & | ~ ! = , " ' + syn region cppRawString matchgroup=cppRawDelim start=+R"\z([[:alnum:]_{}[\]#<>%:;.?*+\-/\^&|~!=,"']*\)(+ end=+)\z1"+ contains=@Spell endif " The minimum and maximum operators in GNU C++ @@ -69,6 +73,8 @@ if version >= 508 || !exists("did_cpp_syntax_inits") HiLink cppStructure Structure HiLink cppBoolean Boolean HiLink cppConstant Constant + HiLink cppRawDelim cFormat + HiLink cppRawString String delcommand HiLink endif -- 1.8.4.2