annotate runtime/syntax/cpp.vim @ 6892:0d3660c07448

Added tag v7-4-765 for changeset f9876721bedc
author Bram Moolenaar <bram@vim.org>
date Fri, 03 Jul 2015 12:44:07 +0200
parents 0303182665d5
children 873eae260c97
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: C++
6663
056809de0b29 updated for version 7.4.656
Bram Moolenaar <bram@vim.org>
parents: 5929
diff changeset
3 " Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp)
4229
fa4089df54bc Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
4 " Previous Maintainer: Ken Shan <ccshan@post.harvard.edu>
6823
0303182665d5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 6663
diff changeset
5 " Last Change: 2015 May 04
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 " Read the C syntax to start with
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 so <sfile>:p:h/c.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 runtime! syntax/c.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 unlet b:current_syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
4229
fa4089df54bc Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
23 " C++ extensions
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn keyword cppStatement new delete this friend using
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn keyword cppAccess public protected private
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn keyword cppType inline virtual explicit export bool wchar_t
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn keyword cppExceptions throw try catch
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn keyword cppOperator operator typeid
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn keyword cppOperator and bitor or xor compl bitand and_eq or_eq xor_eq not not_eq
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn match cppCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*<"me=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn match cppCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn keyword cppStorageClass mutable
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn keyword cppStructure class typename template namespace
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn keyword cppBoolean true false
6663
056809de0b29 updated for version 7.4.656
Bram Moolenaar <bram@vim.org>
parents: 5929
diff changeset
35 syn keyword cppConstant __cplusplus
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36
4229
fa4089df54bc Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
37 " C++ 11 extensions
fa4089df54bc Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
38 if !exists("cpp_no_cpp11")
fa4089df54bc Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
39 syn keyword cppType override final
fa4089df54bc Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
40 syn keyword cppExceptions noexcept
6663
056809de0b29 updated for version 7.4.656
Bram Moolenaar <bram@vim.org>
parents: 5929
diff changeset
41 syn keyword cppStorageClass constexpr decltype thread_local
4229
fa4089df54bc Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
42 syn keyword cppConstant nullptr
6663
056809de0b29 updated for version 7.4.656
Bram Moolenaar <bram@vim.org>
parents: 5929
diff changeset
43 syn keyword cppConstant ATOMIC_FLAG_INIT ATOMIC_VAR_INIT
056809de0b29 updated for version 7.4.656
Bram Moolenaar <bram@vim.org>
parents: 5929
diff changeset
44 syn keyword cppConstant ATOMIC_BOOL_LOCK_FREE ATOMIC_CHAR_LOCK_FREE
056809de0b29 updated for version 7.4.656
Bram Moolenaar <bram@vim.org>
parents: 5929
diff changeset
45 syn keyword cppConstant ATOMIC_CHAR16_T_LOCK_FREE ATOMIC_CHAR32_T_LOCK_FREE
056809de0b29 updated for version 7.4.656
Bram Moolenaar <bram@vim.org>
parents: 5929
diff changeset
46 syn keyword cppConstant ATOMIC_WCHAR_T_LOCK_FREE ATOMIC_SHORT_LOCK_FREE
056809de0b29 updated for version 7.4.656
Bram Moolenaar <bram@vim.org>
parents: 5929
diff changeset
47 syn keyword cppConstant ATOMIC_INT_LOCK_FREE ATOMIC_LONG_LOCK_FREE
056809de0b29 updated for version 7.4.656
Bram Moolenaar <bram@vim.org>
parents: 5929
diff changeset
48 syn keyword cppConstant ATOMIC_LLONG_LOCK_FREE ATOMIC_POINTER_LOCK_FREE
6823
0303182665d5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 6663
diff changeset
49 syn region cppRawString matchgroup=cppRawStringDelimiter start=+\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(+ end=+)\z1"+ contains=@Spell
4229
fa4089df54bc Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
50 endif
fa4089df54bc Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
51
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 " The minimum and maximum operators in GNU C++
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn match cppMinMax "[<>]?"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 " Default highlighting
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 if version >= 508 || !exists("did_cpp_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 let did_cpp_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 HiLink cppAccess cppStatement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 HiLink cppCast cppStatement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 HiLink cppExceptions Exception
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 HiLink cppOperator Operator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 HiLink cppStatement Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 HiLink cppType Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 HiLink cppStorageClass StorageClass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 HiLink cppStructure Structure
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 HiLink cppBoolean Boolean
4229
fa4089df54bc Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
72 HiLink cppConstant Constant
6823
0303182665d5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 6663
diff changeset
73 HiLink cppRawStringDelimiter Delimiter
5929
16d26051085a Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 4229
diff changeset
74 HiLink cppRawString String
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 let b:current_syntax = "cpp"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 " vim: ts=8