8000 Merge pull request #10 from jwakely/master · ChaiScript/vim-cpp@c43c0a6 · GitHub
[go: up one dir, main page]

Skip to content
< 8000 div class="Box-sc-g0xbh4-0 hEHvLI prc-PageHeader-TitleArea-jxJZy" data-component="TitleArea" data-size-variant="large">

Commit c43c0a6

Browse files
committed
Merge pull request vim-jp#10 from jwakely/master
Add more C++11 highlighting
2 parents cac0189 + 77968bc commit c43c0a6

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

syntax/cpp.vim

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,24 @@ syn match cppCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*$"
3232
syn keyword cppStorageClass mutable
3333
syn keyword cppStructure class typename template namespace
3434
syn keyword cppBoolean true false
35+
syn keyword cppConstant __cplusplus
3536

3637
" C++ 11 extensions
3738
if !exists("cpp_no_cpp11")
3839
syn keyword cppType override final
3940
syn keyword cppExceptions noexcept
40-
syn keyword cppStorageClass constexpr decltype
41+
syn keyword cppStorageClass constexpr decltype thread_local
4142
syn keyword cppConstant nullptr
43+
syn keyword cppConstant ATOMIC_FLAG_INIT ATOMIC_VAR_INIT
44+
syn keyword cppConstant ATOMIC_BOOL_LOCK_FREE ATOMIC_CHAR_LOCK_FREE
45+
syn keyword cppConstant ATOMIC_CHAR16_T_LOCK_FREE ATOMIC_CHAR32_T_LOCK_FREE
46+
syn keyword cppConstant ATOMIC_WCHAR_T_LOCK_FREE ATOMIC_SHORT_LOCK_FREE
47+
syn keyword cppConstant ATOMIC_INT_LOCK_FREE ATOMIC_LONG_LOCK_FREE
48+
syn keyword cppConstant ATOMIC_LLONG_LOCK_FREE ATOMIC_POINTER_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
4253
endif
4354

4455
" The minimum and maximum operators in GNU C++
@@ -62,6 +73,8 @@ if version >= 508 || !exists("did_cpp_syntax_inits")
6273
HiLink cppStructure Structure
6374
HiLink cppBoolean Boolean
6475
HiLink cppConstant Constant
76+
HiLink cppRawDelim cFormat
77+
HiLink cppRawString String
6578
delcommand HiLink
6679
endif
6780

0 commit comments

Comments
 (0)
0