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