From a53409b564458f7a94c8fcd0725d1953dee58dce Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Fri, 28 Apr 2017 21:06:44 +0200 Subject: vim-patch:89bcfda6834a Updated runtime files. Remove version checks for Vim older than 6.0. https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5 --- runtime/syntax/xpm2.vim | 38 ++++++++++++-------------------------- 1 file changed, 12 insertions(+), 26 deletions(-) (limited to 'runtime/syntax/xpm2.vim') diff --git a/runtime/syntax/xpm2.vim b/runtime/syntax/xpm2.vim index 74b3c66af2..908f3914e5 100644 --- a/runtime/syntax/xpm2.vim +++ b/runtime/syntax/xpm2.vim @@ -7,11 +7,8 @@ " " Made from xpm.vim by Ronald Schild -" 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 @@ -23,13 +20,8 @@ syn keyword xpm2Todo TODO FIXME XXX contained syn match xpm2Comment "\!.*$" contains=@Spell,xpm2Todo -if version < 508 - command -nargs=+ HiLink hi link - command -nargs=+ Hi hi -else - command -nargs=+ HiLink hi def link - command -nargs=+ Hi hi def -endif +command -nargs=+ HiLink hi def link +command -nargs=+ Hi hi def if has("gui_running") @@ -144,20 +136,14 @@ if has("gui_running") endif " has("gui_running") " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_xpm2_syntax_inits") - if version < 508 - let did_xpm2_syntax_inits = 1 - endif - - " The default highlighting. - HiLink xpm2Type Type - HiLink xpm2StorageClass StorageClass - HiLink xpm2Todo Todo - HiLink xpm2Comment Comment - HiLink xpm2PixelString String -endif +" Only when an item doesn't have highlighting yet +" The default highlighting. +HiLink xpm2Type Type +HiLink xpm2StorageClass StorageClass +HiLink xpm2Todo Todo +HiLink xpm2Comment Comment +HiLink xpm2PixelString String + delcommand HiLink delcommand Hi -- cgit From 86b596dc7a49f1b148ef82a356b972b93ed0f6d4 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Fri, 28 Apr 2017 21:14:34 +0200 Subject: vim-patch:f37506f60f87 Updated runtime files. Remove HiLink commands. https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c --- runtime/syntax/xpm2.vim | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'runtime/syntax/xpm2.vim') diff --git a/runtime/syntax/xpm2.vim b/runtime/syntax/xpm2.vim index 908f3914e5..1d0eb572fd 100644 --- a/runtime/syntax/xpm2.vim +++ b/runtime/syntax/xpm2.vim @@ -20,7 +20,6 @@ syn keyword xpm2Todo TODO FIXME XXX contained syn match xpm2Comment "\!.*$" contains=@Spell,xpm2Todo -command -nargs=+ HiLink hi def link command -nargs=+ Hi hi def if has("gui_running") @@ -55,7 +54,7 @@ if has("gui_running") if s !~ '/' exe 'syn match xpm2Values /' . s . '/' endif - HiLink xpm2Values Statement + hi def link xpm2Values Statement let n = 1 " n = color index @@ -104,11 +103,11 @@ if has("gui_running") " now create syntax items " highlight the color string as normal string (no pixel string) exe 'syn match xpm2Col'.n.'Def /'.s.'/ contains=xpm2Col'.n.'inDef' - exe 'HiLink xpm2Col'.n.'Def Constant' + exe 'hi def link xpm2Col'.n.'Def Constant' " but highlight the first whitespace after chars in its color exe 'syn match xpm2Col'.n.'inDef /^'.chars.'/hs=s+'.(cpp).' contained' - exe 'HiLink xpm2Col'.n.'inDef xpm2Color'.n + exe 'hi def link xpm2Col'.n.'inDef xpm2Color'.n " remove the following whitespace from chars let chars = substitute(chars, '\\s\\+$', '', '') @@ -138,13 +137,12 @@ endif " has("gui_running") " Define the default highlighting. " Only when an item doesn't have highlighting yet " The default highlighting. -HiLink xpm2Type Type -HiLink xpm2StorageClass StorageClass -HiLink xpm2Todo Todo -HiLink xpm2Comment Comment -HiLink xpm2PixelString String +hi def link xpm2Type Type +hi def link xpm2StorageClass StorageClass +hi def link xpm2Todo Todo +hi def link xpm2Comment Comment +hi def link xpm2PixelString String -delcommand HiLink delcommand Hi let b:current_syntax = "xpm2" -- cgit From deccd843edc9ecda04fae09bb550a90b1ba20632 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Mon, 1 May 2017 13:23:39 +0200 Subject: vim-patch:3df0173fa6d0 Updated runtime files. https://github.com/vim/vim/commit/3df0173fa6d0418e89ef4e9c1d04a97c92eec27c --- runtime/syntax/xpm2.vim | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'runtime/syntax/xpm2.vim') diff --git a/runtime/syntax/xpm2.vim b/runtime/syntax/xpm2.vim index 1d0eb572fd..dfa6945a31 100644 --- a/runtime/syntax/xpm2.vim +++ b/runtime/syntax/xpm2.vim @@ -1,9 +1,10 @@ " Vim syntax file " Language: X Pixmap v2 " Maintainer: Steve Wall (hitched97@velnet.com) -" Last Change: 2012 Jun 01 +" Last Change: 2017 Feb 01 " (Dominique Pelle added @Spell) " Version: 5.8 +" Jemma Nelson added termguicolors support " " Made from xpm.vim by Ronald Schild @@ -22,7 +23,7 @@ syn match xpm2Comment "\!.*$" contains=@Spell,xpm2Todo command -nargs=+ Hi hi def -if has("gui_running") +if has("gui_running") || has("termguicolors") && &termguicolors let color = "" let chars = "" @@ -132,7 +133,7 @@ if has("gui_running") unlet color chars colors cpp n i s -endif " has("gui_running") +endif " has("gui_running") || has("termguicolors") && &termguicolors " Define the default highlighting. " Only when an item doesn't have highlighting yet -- cgit