Mercurial > vim
comparison runtime/syntax/wml.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 |
---|---|
14 " If you are looking for the "Wireless Markup Language" syntax file, | 14 " If you are looking for the "Wireless Markup Language" syntax file, |
15 " please take a look at the wap.vim file done by Ralf Schandl, soon in a | 15 " please take a look at the wap.vim file done by Ralf Schandl, soon in a |
16 " vim-package around your corner :) | 16 " vim-package around your corner :) |
17 | 17 |
18 | 18 |
19 " For version 5.x: Clear all syntax items | 19 " quit when a syntax file was already loaded |
20 " For version 6.x: Quit when a syntax file was already loaded | 20 if exists("b:current_syntax") |
21 if version < 600 | |
22 syn clear | |
23 elseif exists("b:current_syntax") | |
24 finish | 21 finish |
25 endif | 22 endif |
26 | 23 |
27 | 24 |
28 " A lot of the web stuff looks like HTML so we load that first | 25 " A lot of the web stuff looks like HTML so we load that first |
29 if version < 600 | 26 runtime! syntax/html.vim |
30 so <sfile>:p:h/html.vim | |
31 else | |
32 runtime! syntax/html.vim | |
33 endif | |
34 unlet b:current_syntax | 27 unlet b:current_syntax |
35 | 28 |
36 if !exists("main_syntax") | 29 if !exists("main_syntax") |
37 let main_syntax = 'wml' | 30 let main_syntax = 'wml' |
38 endif | 31 endif |
106 syn region htmlTagName start="\<\(define-tag\|define-region\)" end="\>" contains=wmlDefineName | 99 syn region htmlTagName start="\<\(define-tag\|define-region\)" end="\>" contains=wmlDefineName |
107 | 100 |
108 " The perl include stuff | 101 " The perl include stuff |
109 if main_syntax != 'perl' | 102 if main_syntax != 'perl' |
110 " Perl script | 103 " Perl script |
111 if version < 600 | 104 syn include @wmlPerlScript syntax/perl.vim |
112 syn include @wmlPerlScript <sfile>:p:h/perl.vim | |
113 else | |
114 syn include @wmlPerlScript syntax/perl.vim | |
115 endif | |
116 unlet b:current_syntax | 105 unlet b:current_syntax |
117 | 106 |
118 syn region perlScript start=+<perl>+ keepend end=+</perl>+ contains=@wmlPerlScript,wmlPerlTag | 107 syn region perlScript start=+<perl>+ keepend end=+</perl>+ contains=@wmlPerlScript,wmlPerlTag |
119 " eperl between '<:' and ':>' -- Alfie [1999-12-26] | 108 " eperl between '<:' and ':>' -- Alfie [1999-12-26] |
120 syn region perlScript start=+<:+ keepend end=+:>+ contains=@wmlPerlScript,wmlPerlTag | 109 syn region perlScript start=+<:+ keepend end=+:>+ contains=@wmlPerlScript,wmlPerlTag |
138 syn sync match wmlHighlightSkip "^.*['\"].*$" | 127 syn sync match wmlHighlightSkip "^.*['\"].*$" |
139 syn sync minlines=10 | 128 syn sync minlines=10 |
140 endif | 129 endif |
141 | 130 |
142 " Define the default highlighting. | 131 " Define the default highlighting. |
143 " For version 5.7 and earlier: only when not done already | 132 " Only when an item doesn't have highlighting yet |
144 " For version 5.8 and later: only when an item doesn't have highlighting yet | 133 command -nargs=+ HiLink hi def link <args> |
145 if version >= 508 || !exists("did_wml_syn_inits") | |
146 let did_wml_syn_inits = 1 | |
147 if version < 508 | |
148 let did_wml_syn_inits = 1 | |
149 command -nargs=+ HiLink hi link <args> | |
150 else | |
151 command -nargs=+ HiLink hi def link <args> | |
152 endif | |
153 | 134 |
154 HiLink wmlNextLine Special | 135 HiLink wmlNextLine Special |
155 HiLink wmlUse Include | 136 HiLink wmlUse Include |
156 HiLink wmlUsed String | 137 HiLink wmlUsed String |
157 HiLink wmlBody Special | 138 HiLink wmlBody Special |
158 HiLink wmlDiverted Label | 139 HiLink wmlDiverted Label |
159 HiLink wmlDivert Delimiter | 140 HiLink wmlDivert Delimiter |
160 HiLink wmlDivertEnd Delimiter | 141 HiLink wmlDivertEnd Delimiter |
161 HiLink wmlLocationId Label | 142 HiLink wmlLocationId Label |
162 HiLink wmlLocation Delimiter | 143 HiLink wmlLocation Delimiter |
163 " HiLink wmlLocationed Delimiter | 144 " HiLink wmlLocationed Delimiter |
164 HiLink wmlDefineName String | 145 HiLink wmlDefineName String |
165 HiLink wmlComment Comment | 146 HiLink wmlComment Comment |
166 HiLink wmlInclude Include | 147 HiLink wmlInclude Include |
167 HiLink wmlSharpBang PreProc | 148 HiLink wmlSharpBang PreProc |
168 | 149 |
169 delcommand HiLink | 150 delcommand HiLink |
170 endif | |
171 | 151 |
172 let b:current_syntax = "wml" | 152 let b:current_syntax = "wml" |