comparison runtime/syntax/webmacro.vim @ 10048:43efa4f5a8ea

commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Aug 30 23:26:57 2016 +0200 Updated runtime files. Remove version checks for Vim older than 6.0.
author Christian Brabandt <cb@256bit.org>
date Tue, 30 Aug 2016 23:30:09 +0200
parents 3fc0f57ecb91
children 46763b01cd9a
comparison
equal deleted inserted replaced
10047:a62862410ca1 10048:43efa4f5a8ea
9 " webmacro: http://www.webmacro.org 9 " webmacro: http://www.webmacro.org
10 10
11 " For version 5.x: Clear all syntax items 11 " For version 5.x: Clear all syntax items
12 " For version 6.x: Quit when a syntax file was already loaded 12 " For version 6.x: Quit when a syntax file was already loaded
13 if !exists("main_syntax") 13 if !exists("main_syntax")
14 if version < 600 14 " quit when a syntax file was already loaded
15 syntax clear 15 if exists("b:current_syntax")
16 elseif exists("b:current_syntax")
17 finish 16 finish
18 endif 17 endif
19 let main_syntax = 'webmacro' 18 let main_syntax = 'webmacro'
20 endif 19 endif
21 20
22 21
23 if version < 600 22 runtime! syntax/html.vim
24 source <sfile>:p:h/html.vim 23 unlet b:current_syntax
25 else
26 runtime! syntax/html.vim
27 unlet b:current_syntax
28 endif
29 24
30 syn cluster htmlPreProc add=webmacroIf,webmacroUse,webmacroBraces,webmacroParse,webmacroInclude,webmacroSet,webmacroForeach,webmacroComment 25 syn cluster htmlPreProc add=webmacroIf,webmacroUse,webmacroBraces,webmacroParse,webmacroInclude,webmacroSet,webmacroForeach,webmacroComment
31 26
32 syn match webmacroVariable "\$[a-zA-Z0-9.()]*;\=" 27 syn match webmacroVariable "\$[a-zA-Z0-9.()]*;\="
33 syn match webmacroNumber "[-+]\=\d\+[lL]\=" contained 28 syn match webmacroNumber "[-+]\=\d\+[lL]\=" contained
47 syn match webmacroBracesError "[{}]" 42 syn match webmacroBracesError "[{}]"
48 syn match webmacroComment "##.*$" 43 syn match webmacroComment "##.*$"
49 syn match webmacroHash "[#{}\$]" contained 44 syn match webmacroHash "[#{}\$]" contained
50 45
51 " Define the default highlighting. 46 " Define the default highlighting.
52 " For version 5.7 and earlier: only when not done already 47 " Only when an item doesn't have highlighting yet
53 " For version 5.8 and later: only when an item doesn't have highlighting yet 48 command -nargs=+ HiLink hi def link <args>
54 if version >= 508 || !exists("did_webmacro_syn_inits")
55 if version < 508
56 let did_webmacro_syn_inits = 1
57 command -nargs=+ HiLink hi link <args>
58 else
59 command -nargs=+ HiLink hi def link <args>
60 endif
61 49
62 HiLink webmacroComment CommentTitle 50 HiLink webmacroComment CommentTitle
63 HiLink webmacroVariable PreProc 51 HiLink webmacroVariable PreProc
64 HiLink webmacroIf webmacroStatement 52 HiLink webmacroIf webmacroStatement
65 HiLink webmacroForeach webmacroStatement 53 HiLink webmacroForeach webmacroStatement
66 HiLink webmacroSet webmacroStatement 54 HiLink webmacroSet webmacroStatement
67 HiLink webmacroInclude webmacroStatement 55 HiLink webmacroInclude webmacroStatement
68 HiLink webmacroParse webmacroStatement 56 HiLink webmacroParse webmacroStatement
69 HiLink webmacroStatement Function 57 HiLink webmacroStatement Function
70 HiLink webmacroNumber Number 58 HiLink webmacroNumber Number
71 HiLink webmacroBoolean Boolean 59 HiLink webmacroBoolean Boolean
72 HiLink webmacroSpecial Special 60 HiLink webmacroSpecial Special
73 HiLink webmacroString String 61 HiLink webmacroString String
74 HiLink webmacroBracesError Error 62 HiLink webmacroBracesError Error
75 delcommand HiLink 63 delcommand HiLink
76 endif
77 64
78 let b:current_syntax = "webmacro" 65 let b:current_syntax = "webmacro"
79 66
80 if main_syntax == 'webmacro' 67 if main_syntax == 'webmacro'
81 unlet main_syntax 68 unlet main_syntax