Mercurial > vim
comparison runtime/syntax/cpp.vim @ 7228:873eae260c97
commit https://github.com/vim/vim/commit/b4ff518d95aa57c2f8c0568c915035bef849581b
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Nov 10 21:15:48 2015 +0100
Updated runtime files.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 10 Nov 2015 21:30:05 +0100 |
parents | 0303182665d5 |
children | be72f4201a1d |
comparison
equal
deleted
inserted
replaced
7227:28f3b34d076f | 7228:873eae260c97 |
---|---|
1 " Vim syntax file | 1 " Vim syntax file |
2 " Language: C++ | 2 " Language: C++ |
3 " Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp) | 3 " Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp) |
4 " Previous Maintainer: Ken Shan <ccshan@post.harvard.edu> | 4 " Previous Maintainer: Ken Shan <ccshan@post.harvard.edu> |
5 " Last Change: 2015 May 04 | 5 " Last Change: 2015 Nov 10 |
6 | 6 |
7 " For version 5.x: Clear all syntax items | 7 " For version 5.x: Clear all syntax items |
8 " For version 6.x: Quit when a syntax file was already loaded | 8 " For version 6.x: Quit when a syntax file was already loaded |
9 if version < 600 | 9 if version < 600 |
10 syntax clear | 10 syntax clear |
21 endif | 21 endif |
22 | 22 |
23 " C++ extensions | 23 " C++ extensions |
24 syn keyword cppStatement new delete this friend using | 24 syn keyword cppStatement new delete this friend using |
25 syn keyword cppAccess public protected private | 25 syn keyword cppAccess public protected private |
26 syn keyword cppType inline virtual explicit export bool wchar_t | 26 syn keyword cppModifier inline virtual explicit export |
27 syn keyword cppType bool wchar_t | |
27 syn keyword cppExceptions throw try catch | 28 syn keyword cppExceptions throw try catch |
28 syn keyword cppOperator operator typeid | 29 syn keyword cppOperator operator typeid |
29 syn keyword cppOperator and bitor or xor compl bitand and_eq or_eq xor_eq not not_eq | 30 syn keyword cppOperator and bitor or xor compl bitand and_eq or_eq xor_eq not not_eq |
30 syn match cppCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*<"me=e-1 | 31 syn match cppCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*<"me=e-1 |
31 syn match cppCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*$" | 32 syn match cppCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*$" |
34 syn keyword cppBoolean true false | 35 syn keyword cppBoolean true false |
35 syn keyword cppConstant __cplusplus | 36 syn keyword cppConstant __cplusplus |
36 | 37 |
37 " C++ 11 extensions | 38 " C++ 11 extensions |
38 if !exists("cpp_no_cpp11") | 39 if !exists("cpp_no_cpp11") |
39 syn keyword cppType override final | 40 syn keyword cppModifier override final |
41 syn keyword cppType nullptr_t | |
40 syn keyword cppExceptions noexcept | 42 syn keyword cppExceptions noexcept |
41 syn keyword cppStorageClass constexpr decltype thread_local | 43 syn keyword cppStorageClass constexpr decltype thread_local |
42 syn keyword cppConstant nullptr | 44 syn keyword cppConstant nullptr |
43 syn keyword cppConstant ATOMIC_FLAG_INIT ATOMIC_VAR_INIT | 45 syn keyword cppConstant ATOMIC_FLAG_INIT ATOMIC_VAR_INIT |
44 syn keyword cppConstant ATOMIC_BOOL_LOCK_FREE ATOMIC_CHAR_LOCK_FREE | 46 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 | 47 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 | 48 syn keyword cppConstant ATOMIC_WCHAR_T_LOCK_FREE ATOMIC_SHORT_LOCK_FREE |
47 syn keyword cppConstant ATOMIC_INT_LOCK_FREE ATOMIC_LONG_LOCK_FREE | 49 syn keyword cppConstant ATOMIC_INT_LOCK_FREE ATOMIC_LONG_LOCK_FREE |
48 syn keyword cppConstant ATOMIC_LLONG_LOCK_FREE ATOMIC_POINTER_LOCK_FREE | 50 syn keyword cppConstant ATOMIC_LLONG_LOCK_FREE ATOMIC_POINTER_LOCK_FREE |
49 syn region cppRawString matchgroup=cppRawStringDelimiter start=+\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(+ end=+)\z1"+ contains=@Spell | 51 syn region cppRawString matchgroup=cppRawStringDelimiter start=+\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(+ end=+)\z1"+ contains=@Spell |
52 endif | |
53 | |
54 " C++ 14 extensions | |
55 if !exists("cpp_no_cpp14") | |
56 syn match cppNumber display "\<0b[01]\+\(u\=l\{0,2}\|ll\=u\)\>" | |
50 endif | 57 endif |
51 | 58 |
52 " The minimum and maximum operators in GNU C++ | 59 " The minimum and maximum operators in GNU C++ |
53 syn match cppMinMax "[<>]?" | 60 syn match cppMinMax "[<>]?" |
54 | 61 |
63 HiLink cppAccess cppStatement | 70 HiLink cppAccess cppStatement |
64 HiLink cppCast cppStatement | 71 HiLink cppCast cppStatement |
65 HiLink cppExceptions Exception | 72 HiLink cppExceptions Exception |
66 HiLink cppOperator Operator | 73 HiLink cppOperator Operator |
67 HiLink cppStatement Statement | 74 HiLink cppStatement Statement |
75 HiLink cppModifier Type | |
68 HiLink cppType Type | 76 HiLink cppType Type |
69 HiLink cppStorageClass StorageClass | 77 HiLink cppStorageClass StorageClass |
70 HiLink cppStructure Structure | 78 HiLink cppStructure Structure |
71 HiLink cppBoolean Boolean | 79 HiLink cppBoolean Boolean |
72 HiLink cppConstant Constant | 80 HiLink cppConstant Constant |