diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-04-29 01:41:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-29 01:41:29 +0200 |
commit | 9f6d693e263b617cd1a1772e42911cd5a0b1675b (patch) | |
tree | 593d3c9d968be92bc1ed8a445e6856079ef546ed /runtime/syntax/cpp.vim | |
parent | 59be0b42806c39131f76f89c554f0a24e82514a8 (diff) | |
parent | 53419673154a98b705cfa80590099a247cc9df49 (diff) | |
download | rneovim-9f6d693e263b617cd1a1772e42911cd5a0b1675b.tar.gz rneovim-9f6d693e263b617cd1a1772e42911cd5a0b1675b.tar.bz2 rneovim-9f6d693e263b617cd1a1772e42911cd5a0b1675b.zip |
Merge #6613 from justinmk/vim-patches
Diffstat (limited to 'runtime/syntax/cpp.vim')
-rw-r--r-- | runtime/syntax/cpp.vim | 52 |
1 files changed, 18 insertions, 34 deletions
diff --git a/runtime/syntax/cpp.vim b/runtime/syntax/cpp.vim index fefd0ff7b0..d669206b3e 100644 --- a/runtime/syntax/cpp.vim +++ b/runtime/syntax/cpp.vim @@ -4,21 +4,14 @@ " Previous Maintainer: Ken Shan <ccshan@post.harvard.edu> " Last Change: 2016 Jul 07 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif " Read the C syntax to start with -if version < 600 - so <sfile>:p:h/c.vim -else - runtime! syntax/c.vim - unlet b:current_syntax -endif +runtime! syntax/c.vim +unlet b:current_syntax " C++ extensions syn keyword cppStatement new delete this friend using @@ -60,29 +53,20 @@ endif syn match cppMinMax "[<>]?" " Default highlighting -if version >= 508 || !exists("did_cpp_syntax_inits") - if version < 508 - let did_cpp_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink cppAccess cppStatement - HiLink cppCast cppStatement - HiLink cppExceptions Exception - HiLink cppOperator Operator - HiLink cppStatement Statement - HiLink cppModifier Type - HiLink cppType Type - HiLink cppStorageClass StorageClass - HiLink cppStructure Structure - HiLink cppBoolean Boolean - HiLink cppConstant Constant - HiLink cppRawStringDelimiter Delimiter - HiLink cppRawString String - HiLink cppNumber Number - delcommand HiLink -endif +hi def link cppAccess cppStatement +hi def link cppCast cppStatement +hi def link cppExceptions Exception +hi def link cppOperator Operator +hi def link cppStatement Statement +hi def link cppModifier Type +hi def link cppType Type +hi def link cppStorageClass StorageClass +hi def link cppStructure Structure +hi def link cppBoolean Boolean +hi def link cppConstant Constant +hi def link cppRawStringDelimiter Delimiter +hi def link cppRawString String +hi def link cppNumber Number let b:current_syntax = "cpp" |