annotate runtime/syntax/cpp.vim @ 5727:0c6baa50f3ce

Added tag v7-4-208 for changeset 9b5541e276aa
author Bram Moolenaar <bram@vim.org>
date Wed, 19 Mar 2014 17:32:51 +0100
parents fa4089df54bc
children 16d26051085a
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++
4229
fa4089df54bc Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
3 " Current Maintainer: vim-jp (https://github.com/vim-jp/cpp-vim)
fa4089df54bc Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
4 " Previous Maintainer: Ken Shan <ccshan@post.harvard.edu>
fa4089df54bc Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
5 " Last Change: 2012 Jun 14
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35
4229
fa4089df54bc Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
36 " C++ 11 extensions
fa4089df54bc Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
37 if !exists("cpp_no_cpp11")
fa4089df54bc Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
38 syn keyword cppType override final
fa4089df54bc Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
39 syn keyword cppExceptions noexcept
fa4089df54bc Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
40 syn keyword cppStorageClass constexpr decltype
fa4089df54bc Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
41 syn keyword cppConstant nullptr
fa4089df54bc Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
42 endif
fa4089df54bc Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
43
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 " The minimum and maximum operators in GNU C++
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn match cppMinMax "[<>]?"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 " Default highlighting
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 if version >= 508 || !exists("did_cpp_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 let did_cpp_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 HiLink cppAccess cppStatement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 HiLink cppCast cppStatement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 HiLink cppExceptions Exception
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 HiLink cppOperator Operator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 HiLink cppStatement Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 HiLink cppType Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 HiLink cppStorageClass StorageClass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 HiLink cppStructure Structure
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 HiLink cppBoolean Boolean
4229
fa4089df54bc Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
64 HiLink cppConstant Constant
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 let b:current_syntax = "cpp"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 " vim: ts=8