comparison runtime/syntax/xpm2.vim @ 10051:46763b01cd9a

commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c Author: Bram Moolenaar <Bram@vim.org> Date: Wed Aug 31 22:22:10 2016 +0200 Updated runtime files. Remove HiLink commands.
author Christian Brabandt <cb@256bit.org>
date Wed, 31 Aug 2016 22:30:08 +0200
parents 43efa4f5a8ea
children c391bfbdb452
comparison
equal deleted inserted replaced
10050:b702edc4b2b8 10051:46763b01cd9a
18 syn region xpm2PixelString start="^" end="$" contains=@xpm2Colors 18 syn region xpm2PixelString start="^" end="$" contains=@xpm2Colors
19 syn keyword xpm2Todo TODO FIXME XXX contained 19 syn keyword xpm2Todo TODO FIXME XXX contained
20 syn match xpm2Comment "\!.*$" contains=@Spell,xpm2Todo 20 syn match xpm2Comment "\!.*$" contains=@Spell,xpm2Todo
21 21
22 22
23 command -nargs=+ HiLink hi def link <args>
24 command -nargs=+ Hi hi def <args> 23 command -nargs=+ Hi hi def <args>
25 24
26 if has("gui_running") 25 if has("gui_running")
27 26
28 let color = "" 27 let color = ""
53 " Highlight the Values string as normal string (no pixel string). 52 " Highlight the Values string as normal string (no pixel string).
54 " Only when there is no slash, it would terminate the pattern. 53 " Only when there is no slash, it would terminate the pattern.
55 if s !~ '/' 54 if s !~ '/'
56 exe 'syn match xpm2Values /' . s . '/' 55 exe 'syn match xpm2Values /' . s . '/'
57 endif 56 endif
58 HiLink xpm2Values Statement 57 hi def link xpm2Values Statement
59 58
60 let n = 1 " n = color index 59 let n = 1 " n = color index
61 60
62 elseif n <= colors " string is a color specification 61 elseif n <= colors " string is a color specification
63 62
102 let chars = substitute(chars, "[ \t][ \t]*", "\\\\s\\\\+", "g") 101 let chars = substitute(chars, "[ \t][ \t]*", "\\\\s\\\\+", "g")
103 102
104 " now create syntax items 103 " now create syntax items
105 " highlight the color string as normal string (no pixel string) 104 " highlight the color string as normal string (no pixel string)
106 exe 'syn match xpm2Col'.n.'Def /'.s.'/ contains=xpm2Col'.n.'inDef' 105 exe 'syn match xpm2Col'.n.'Def /'.s.'/ contains=xpm2Col'.n.'inDef'
107 exe 'HiLink xpm2Col'.n.'Def Constant' 106 exe 'hi def link xpm2Col'.n.'Def Constant'
108 107
109 " but highlight the first whitespace after chars in its color 108 " but highlight the first whitespace after chars in its color
110 exe 'syn match xpm2Col'.n.'inDef /^'.chars.'/hs=s+'.(cpp).' contained' 109 exe 'syn match xpm2Col'.n.'inDef /^'.chars.'/hs=s+'.(cpp).' contained'
111 exe 'HiLink xpm2Col'.n.'inDef xpm2Color'.n 110 exe 'hi def link xpm2Col'.n.'inDef xpm2Color'.n
112 111
113 " remove the following whitespace from chars 112 " remove the following whitespace from chars
114 let chars = substitute(chars, '\\s\\+$', '', '') 113 let chars = substitute(chars, '\\s\\+$', '', '')
115 114
116 " and create the syntax item contained in the pixel strings 115 " and create the syntax item contained in the pixel strings
136 endif " has("gui_running") 135 endif " has("gui_running")
137 136
138 " Define the default highlighting. 137 " Define the default highlighting.
139 " Only when an item doesn't have highlighting yet 138 " Only when an item doesn't have highlighting yet
140 " The default highlighting. 139 " The default highlighting.
141 HiLink xpm2Type Type 140 hi def link xpm2Type Type
142 HiLink xpm2StorageClass StorageClass 141 hi def link xpm2StorageClass StorageClass
143 HiLink xpm2Todo Todo 142 hi def link xpm2Todo Todo
144 HiLink xpm2Comment Comment 143 hi def link xpm2Comment Comment
145 HiLink xpm2PixelString String 144 hi def link xpm2PixelString String
146 145
147 delcommand HiLink
148 delcommand Hi 146 delcommand Hi
149 147
150 let b:current_syntax = "xpm2" 148 let b:current_syntax = "xpm2"
151 149
152 let &cpo = s:cpo_save 150 let &cpo = s:cpo_save