|
|
22c937 |
diff -up vim74/runtime/syntax/cpp.vim.c++11 vim74/runtime/syntax/cpp.vim
|
|
|
22c937 |
--- vim74/runtime/syntax/cpp.vim.c++11 2017-08-23 17:49:00.722250142 +0200
|
|
|
22c937 |
+++ vim74/runtime/syntax/cpp.vim 2017-08-23 17:49:29.132979711 +0200
|
|
|
22c937 |
@@ -1,29 +1,23 @@
|
|
|
22c937 |
" Vim syntax file
|
|
|
22c937 |
" Language: C++
|
|
|
22c937 |
-" Current Maintainer: vim-jp (https://github.com/vim-jp/cpp-vim)
|
|
|
22c937 |
+" Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp)
|
|
|
22c937 |
" Previous Maintainer: Ken Shan <ccshan@post.harvard.edu>
|
|
|
22c937 |
-" Last Change: 2012 Jun 14
|
|
|
22c937 |
+" Last Change: 2017 Jun 05
|
|
|
22c937 |
|
|
|
22c937 |
-" For version 5.x: Clear all syntax items
|
|
|
22c937 |
-" For version 6.x: Quit when a syntax file was already loaded
|
|
|
22c937 |
-if version < 600
|
|
|
22c937 |
- syntax clear
|
|
|
22c937 |
-elseif exists("b:current_syntax")
|
|
|
22c937 |
+" quit when a syntax file was already loaded
|
|
|
22c937 |
+if exists("b:current_syntax")
|
|
|
22c937 |
finish
|
|
|
22c937 |
endif
|
|
|
22c937 |
|
|
|
22c937 |
" Read the C syntax to start with
|
|
|
22c937 |
-if version < 600
|
|
|
22c937 |
- so <sfile>:p:h/c.vim
|
|
|
22c937 |
-else
|
|
|
22c937 |
- runtime! syntax/c.vim
|
|
|
22c937 |
- unlet b:current_syntax
|
|
|
22c937 |
-endif
|
|
|
22c937 |
+runtime! syntax/c.vim
|
|
|
22c937 |
+unlet b:current_syntax
|
|
|
22c937 |
|
|
|
22c937 |
" C++ extensions
|
|
|
22c937 |
syn keyword cppStatement new delete this friend using
|
|
|
22c937 |
syn keyword cppAccess public protected private
|
|
|
22c937 |
-syn keyword cppType inline virtual explicit export bool wchar_t
|
|
|
22c937 |
+syn keyword cppModifier inline virtual explicit export
|
|
|
22c937 |
+syn keyword cppType bool wchar_t
|
|
|
22c937 |
syn keyword cppExceptions throw try catch
|
|
|
22c937 |
syn keyword cppOperator operator typeid
|
|
|
22c937 |
syn keyword cppOperator and bitor or xor compl bitand and_eq or_eq xor_eq not not_eq
|
|
|
22c937 |
@@ -32,38 +26,51 @@ syn match cppCast "\<\(const\|static\|d
|
|
|
22c937 |
syn keyword cppStorageClass mutable
|
|
|
22c937 |
syn keyword cppStructure class typename template namespace
|
|
|
22c937 |
syn keyword cppBoolean true false
|
|
|
22c937 |
+syn keyword cppConstant __cplusplus
|
|
|
22c937 |
|
|
|
22c937 |
" C++ 11 extensions
|
|
|
22c937 |
if !exists("cpp_no_cpp11")
|
|
|
22c937 |
- syn keyword cppType override final
|
|
|
22c937 |
+ syn keyword cppModifier override final
|
|
|
22c937 |
+ syn keyword cppType nullptr_t auto
|
|
|
22c937 |
syn keyword cppExceptions noexcept
|
|
|
22c937 |
- syn keyword cppStorageClass constexpr decltype
|
|
|
22c937 |
+ syn keyword cppStorageClass constexpr decltype thread_local
|
|
|
22c937 |
syn keyword cppConstant nullptr
|
|
|
22c937 |
+ syn keyword cppConstant ATOMIC_FLAG_INIT ATOMIC_VAR_INIT
|
|
|
22c937 |
+ syn keyword cppConstant ATOMIC_BOOL_LOCK_FREE ATOMIC_CHAR_LOCK_FREE
|
|
|
22c937 |
+ syn keyword cppConstant ATOMIC_CHAR16_T_LOCK_FREE ATOMIC_CHAR32_T_LOCK_FREE
|
|
|
22c937 |
+ syn keyword cppConstant ATOMIC_WCHAR_T_LOCK_FREE ATOMIC_SHORT_LOCK_FREE
|
|
|
22c937 |
+ syn keyword cppConstant ATOMIC_INT_LOCK_FREE ATOMIC_LONG_LOCK_FREE
|
|
|
22c937 |
+ syn keyword cppConstant ATOMIC_LLONG_LOCK_FREE ATOMIC_POINTER_LOCK_FREE
|
|
|
22c937 |
+ syn region cppRawString matchgroup=cppRawStringDelimiter start=+\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(+ end=+)\z1"+ contains=@Spell
|
|
|
22c937 |
+endif
|
|
|
22c937 |
+
|
|
|
22c937 |
+" C++ 14 extensions
|
|
|
22c937 |
+if !exists("cpp_no_cpp14")
|
|
|
22c937 |
+ syn case ignore
|
|
|
22c937 |
+ syn match cppNumber display "\<0b[01]\('\=[01]\+\)*\(u\=l\{0,2}\|ll\=u\)\>"
|
|
|
22c937 |
+ syn match cppNumber display "\<[1-9]\('\=\d\+\)*\(u\=l\{0,2}\|ll\=u\)\>" contains=cFloat
|
|
|
22c937 |
+ syn match cppNumber display "\<0x\x\('\=\x\+\)*\(u\=l\{0,2}\|ll\=u\)\>"
|
|
|
22c937 |
+ syn case match
|
|
|
22c937 |
endif
|
|
|
22c937 |
|
|
|
22c937 |
" The minimum and maximum operators in GNU C++
|
|
|
22c937 |
syn match cppMinMax "[<>]?"
|
|
|
22c937 |
|
|
|
22c937 |
" Default highlighting
|
|
|
22c937 |
-if version >= 508 || !exists("did_cpp_syntax_inits")
|
|
|
22c937 |
- if version < 508
|
|
|
22c937 |
- let did_cpp_syntax_inits = 1
|
|
|
22c937 |
- command -nargs=+ HiLink hi link <args>
|
|
|
22c937 |
- else
|
|
|
22c937 |
- command -nargs=+ HiLink hi def link <args>
|
|
|
22c937 |
- endif
|
|
|
22c937 |
- HiLink cppAccess cppStatement
|
|
|
22c937 |
- HiLink cppCast cppStatement
|
|
|
22c937 |
- HiLink cppExceptions Exception
|
|
|
22c937 |
- HiLink cppOperator Operator
|
|
|
22c937 |
- HiLink cppStatement Statement
|
|
|
22c937 |
- HiLink cppType Type
|
|
|
22c937 |
- HiLink cppStorageClass StorageClass
|
|
|
22c937 |
- HiLink cppStructure Structure
|
|
|
22c937 |
- HiLink cppBoolean Boolean
|
|
|
22c937 |
- HiLink cppConstant Constant
|
|
|
22c937 |
- delcommand HiLink
|
|
|
22c937 |
-endif
|
|
|
22c937 |
+hi def link cppAccess cppStatement
|
|
|
22c937 |
+hi def link cppCast cppStatement
|
|
|
22c937 |
+hi def link cppExceptions Exception
|
|
|
22c937 |
+hi def link cppOperator Operator
|
|
|
22c937 |
+hi def link cppStatement Statement
|
|
|
22c937 |
+hi def link cppModifier Type
|
|
|
22c937 |
+hi def link cppType Type
|
|
|
22c937 |
+hi def link cppStorageClass StorageClass
|
|
|
22c937 |
+hi def link cppStructure Structure
|
|
|
22c937 |
+hi def link cppBoolean Boolean
|
|
|
22c937 |
+hi def link cppConstant Constant
|
|
|
22c937 |
+hi def link cppRawStringDelimiter Delimiter
|
|
|
22c937 |
+hi def link cppRawString String
|
|
|
22c937 |
+hi def link cppNumber Number
|
|
|
22c937 |
|
|
|
22c937 |
let b:current_syntax = "cpp"
|
|
|
22c937 |
|