Mercurial > vim
annotate runtime/syntax/html.vim @ 24103:788e10cec9bd
Update runtime files.
Commit: https://github.com/vim/vim/commit/c8cdf0f80b3cfd88a4490d80572062c1fd1a96ca
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Mar 13 13:28:13 2021 +0100
Update runtime files.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 13 Mar 2021 13:30:04 +0100 |
parents | ef454a7f485d |
children | 67f31c24291b |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
10498
883396809b45
commit https://github.com/vim/vim/commit/bc2eada5424bff06f7eb77c032ecc067da52b846
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
2 " Language: HTML |
24024 | 3 " Previous Maintainer: Jorge Maldonado Ventura <jorgesumle@freakspot.net> |
10498
883396809b45
commit https://github.com/vim/vim/commit/bc2eada5424bff06f7eb77c032ecc067da52b846
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
4 " Previous Maintainer: Claudio Fleiner <claudio@fleiner.com> |
10548
74effdaa369e
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10498
diff
changeset
|
5 " Repository: https://notabug.org/jorgesumle/vim-html-syntax |
24103 | 6 " Last Change: 2021 Mar 02 |
24024 | 7 " Included patch #7900 to fix comments |
24103 | 8 " Included patch #7916 to fix a few more things |
12756
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
10734
diff
changeset
|
9 " |
7 | 10 |
11 " Please check :help html.vim for some comments and a description of the options | |
12 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
13 " quit when a syntax file was already loaded |
7 | 14 if !exists("main_syntax") |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
15 if exists("b:current_syntax") |
7 | 16 finish |
17 endif | |
18 let main_syntax = 'html' | |
19 endif | |
20 | |
3854 | 21 let s:cpo_save = &cpo |
22 set cpo&vim | |
23 | |
1125 | 24 syntax spell toplevel |
7 | 25 |
26 syn case ignore | |
27 | |
28 " mark illegal characters | |
29 syn match htmlError "[<>&]" | |
30 | |
31 | |
32 " tags | |
33 syn region htmlString contained start=+"+ end=+"+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc | |
34 syn region htmlString contained start=+'+ end=+'+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc | |
35 syn match htmlValue contained "=[\t ]*[^'" \t>][^ \t>]*"hs=s+1 contains=javaScriptExpression,@htmlPreproc | |
829 | 36 syn region htmlEndTag start=+</+ end=+>+ contains=htmlTagN,htmlTagError |
3854 | 37 syn region htmlTag start=+<[^/]+ end=+>+ fold contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster |
7 | 38 syn match htmlTagN contained +<\s*[-a-zA-Z0-9]\++hs=s+1 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster |
39 syn match htmlTagN contained +</\s*[-a-zA-Z0-9]\++hs=s+2 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster | |
40 syn match htmlTagError contained "[^>]<"ms=s+1 | |
41 | |
42 | |
43 " tag names | |
44 syn keyword htmlTagName contained address applet area a base basefont | |
45 syn keyword htmlTagName contained big blockquote br caption center | |
46 syn keyword htmlTagName contained cite code dd dfn dir div dl dt font | |
47 syn keyword htmlTagName contained form hr html img | |
48 syn keyword htmlTagName contained input isindex kbd li link map menu | |
49 syn keyword htmlTagName contained meta ol option param pre p samp span | |
12756
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
10734
diff
changeset
|
50 syn keyword htmlTagName contained select small sub sup |
7 | 51 syn keyword htmlTagName contained table td textarea th tr tt ul var xmp |
52 syn match htmlTagName contained "\<\(b\|i\|u\|h[1-6]\|em\|strong\|head\|body\|title\)\>" | |
53 | |
54 " new html 4.0 tags | |
55 syn keyword htmlTagName contained abbr acronym bdo button col label | |
12756
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
10734
diff
changeset
|
56 syn keyword htmlTagName contained colgroup fieldset iframe ins legend |
7 | 57 syn keyword htmlTagName contained object optgroup q s tbody tfoot thead |
58 | |
10498
883396809b45
commit https://github.com/vim/vim/commit/bc2eada5424bff06f7eb77c032ecc067da52b846
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
59 " new html 5 tags |
10734 | 60 syn keyword htmlTagName contained article aside audio bdi canvas data |
18972 | 61 syn keyword htmlTagName contained datalist details dialog embed figcaption |
62 syn keyword htmlTagName contained figure footer header hgroup keygen main | |
63 syn keyword htmlTagName contained mark menuitem meter nav output picture | |
10498
883396809b45
commit https://github.com/vim/vim/commit/bc2eada5424bff06f7eb77c032ecc067da52b846
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
64 syn keyword htmlTagName contained progress rb rp rt rtc ruby section |
19721 | 65 syn keyword htmlTagName contained slot source summary template time track |
66 syn keyword htmlTagName contained video wbr | |
10498
883396809b45
commit https://github.com/vim/vim/commit/bc2eada5424bff06f7eb77c032ecc067da52b846
Christian Brabandt <cb@256bit.org>
parents:
10051
diff
changeset
|
67 |
7 | 68 " legal arg names |
69 syn keyword htmlArg contained action | |
70 syn keyword htmlArg contained align alink alt archive background bgcolor | |
71 syn keyword htmlArg contained border bordercolor cellpadding | |
72 syn keyword htmlArg contained cellspacing checked class clear code codebase color | |
73 syn keyword htmlArg contained cols colspan content coords enctype face | |
74 syn keyword htmlArg contained gutter height hspace id | |
75 syn keyword htmlArg contained link lowsrc marginheight | |
76 syn keyword htmlArg contained marginwidth maxlength method name prompt | |
77 syn keyword htmlArg contained rel rev rows rowspan scrolling selected shape | |
78 syn keyword htmlArg contained size src start target text type url | |
79 syn keyword htmlArg contained usemap ismap valign value vlink vspace width wrap | |
80 syn match htmlArg contained "\<\(http-equiv\|href\|title\)="me=e-1 | |
81 | |
14123 | 82 " aria attributes |
24103 | 83 exe 'syn match htmlArg contained "\<aria-\%(' . join([ |
84 \ 'activedescendant', 'atomic', 'autocomplete', 'busy', 'checked', 'colcount', | |
85 \ 'colindex', 'colspan', 'controls', 'current', 'describedby', 'details', | |
86 \ 'disabled', 'dropeffect', 'errormessage', 'expanded', 'flowto', 'grabbed', | |
87 \ 'haspopup', 'hidden', 'invalid', 'keyshortcuts', 'label', 'labelledby', 'level', | |
88 \ 'live', 'modal', 'multiline', 'multiselectable', 'orientation', 'owns', | |
89 \ 'placeholder', 'posinset', 'pressed', 'readonly', 'relevant', 'required', | |
90 \ 'roledescription', 'rowcount', 'rowindex', 'rowspan', 'selected', 'setsize', | |
91 \ 'sort', 'valuemax', 'valuemin', 'valuenow', 'valuetext' | |
92 \ ], '\|') . '\)\>"' | |
14123 | 93 syn keyword htmlArg contained role |
94 | |
7 | 95 " Netscape extensions |
96 syn keyword htmlTagName contained frame noframes frameset nobr blink | |
97 syn keyword htmlTagName contained layer ilayer nolayer spacer | |
98 syn keyword htmlArg contained frameborder noresize pagex pagey above below | |
99 syn keyword htmlArg contained left top visibility clip id noshade | |
100 syn match htmlArg contained "\<z-index\>" | |
101 | |
102 " Microsoft extensions | |
103 syn keyword htmlTagName contained marquee | |
104 | |
105 " html 4.0 arg names | |
106 syn match htmlArg contained "\<\(accept-charset\|label\)\>" | |
107 syn keyword htmlArg contained abbr accept accesskey axis char charoff charset | |
108 syn keyword htmlArg contained cite classid codetype compact data datetime | |
109 syn keyword htmlArg contained declare defer dir disabled for frame | |
110 syn keyword htmlArg contained headers hreflang lang language longdesc | |
111 syn keyword htmlArg contained multiple nohref nowrap object profile readonly | |
112 syn keyword htmlArg contained rules scheme scope span standby style | |
113 syn keyword htmlArg contained summary tabindex valuetype version | |
114 | |
10548
74effdaa369e
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10498
diff
changeset
|
115 " html 5 arg names |
10734 | 116 syn keyword htmlArg contained allowfullscreen async autocomplete autofocus |
117 syn keyword htmlArg contained autoplay challenge contenteditable contextmenu | |
18972 | 118 syn keyword htmlArg contained controls crossorigin default dirname download |
119 syn keyword htmlArg contained draggable dropzone form formaction formenctype | |
120 syn keyword htmlArg contained formmethod formnovalidate formtarget hidden | |
121 syn keyword htmlArg contained high icon inputmode keytype kind list loop low | |
122 syn keyword htmlArg contained max min minlength muted nonce novalidate open | |
10734 | 123 syn keyword htmlArg contained optimum pattern placeholder poster preload |
124 syn keyword htmlArg contained radiogroup required reversed sandbox spellcheck | |
125 syn keyword htmlArg contained sizes srcset srcdoc srclang step title translate | |
126 syn keyword htmlArg contained typemustmatch | |
10548
74effdaa369e
Updated runtime files.
Christian Brabandt <cb@256bit.org>
parents:
10498
diff
changeset
|
127 |
7 | 128 " special characters |
129 syn match htmlSpecialChar "&#\=[0-9A-Za-z]\{1,8};" | |
130 | |
131 " Comments (the real ones or the old netscape ones) | |
132 if exists("html_wrong_comments") | |
24103 | 133 syn region htmlComment start=+<!--+ end=+--\s*>+ contains=@Spell |
7 | 134 else |
24103 | 135 " The HTML 5.2 syntax 8.2.4.41: bogus comment is parser error; browser skips until next > |
136 syn region htmlComment start=+<!+ end=+>+ contains=htmlCommentError keepend | |
137 " Idem 8.2.4.42,51: Comment starts with <!-- and ends with --> | |
138 " Idem 8.2.4.43,44: Except <!--> and <!---> are parser errors | |
139 " Idem 8.2.4.52: dash-dash-bang (--!>) is error ignored by parser, also closes comment | |
140 syn region htmlComment matchgroup=htmlComment start=+<!--\%(-\?>\)\@!+ end=+--!\?>+ contains=htmlCommentNested,@htmlPreProc,@Spell keepend | |
141 " Idem 8.2.4.49: nested comment is parser error, except <!--> is all right | |
142 syn match htmlCommentNested contained "<!-->\@!" | |
143 syn match htmlCommentError contained "[^><!]" | |
7 | 144 endif |
24103 | 145 syn region htmlComment start=+<!DOCTYPE+ end=+>+ keepend |
7 | 146 |
147 " server-parsed commands | |
148 syn region htmlPreProc start=+<!--#+ end=+-->+ contains=htmlPreStmt,htmlPreError,htmlPreAttr | |
149 syn match htmlPreStmt contained "<!--#\(config\|echo\|exec\|fsize\|flastmod\|include\|printenv\|set\|if\|elif\|else\|endif\|geoguide\)\>" | |
150 syn match htmlPreError contained "<!--#\S*"ms=s+4 | |
151 syn match htmlPreAttr contained "\w\+=[^"]\S\+" contains=htmlPreProcAttrError,htmlPreProcAttrName | |
152 syn region htmlPreAttr contained start=+\w\+="+ skip=+\\\\\|\\"+ end=+"+ contains=htmlPreProcAttrName keepend | |
153 syn match htmlPreProcAttrError contained "\w\+="he=e-1 | |
154 syn match htmlPreProcAttrName contained "\(expr\|errmsg\|sizefmt\|timefmt\|var\|cgi\|cmd\|file\|virtual\|value\)="he=e-1 | |
155 | |
156 if !exists("html_no_rendering") | |
157 " rendering | |
419 | 158 syn cluster htmlTop contains=@Spell,htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLink,javaScript,@htmlPreproc |
7 | 159 |
16267 | 160 syn region htmlStrike start="<del\>" end="</del\_s*>"me=s-1 contains=@htmlTop |
161 syn region htmlStrike start="<strike\>" end="</strike\_s*>"me=s-1 contains=@htmlTop | |
12756
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
10734
diff
changeset
|
162 |
16267 | 163 syn region htmlBold start="<b\>" end="</b\_s*>"me=s-1 contains=@htmlTop,htmlBoldUnderline,htmlBoldItalic |
164 syn region htmlBold start="<strong\>" end="</strong\_s*>"me=s-1 contains=@htmlTop,htmlBoldUnderline,htmlBoldItalic | |
165 syn region htmlBoldUnderline contained start="<u\>" end="</u\_s*>"me=s-1 contains=@htmlTop,htmlBoldUnderlineItalic | |
166 syn region htmlBoldItalic contained start="<i\>" end="</i\_s*>"me=s-1 contains=@htmlTop,htmlBoldItalicUnderline | |
167 syn region htmlBoldItalic contained start="<em\>" end="</em\_s*>"me=s-1 contains=@htmlTop,htmlBoldItalicUnderline | |
168 syn region htmlBoldUnderlineItalic contained start="<i\>" end="</i\_s*>"me=s-1 contains=@htmlTop | |
169 syn region htmlBoldUnderlineItalic contained start="<em\>" end="</em\_s*>"me=s-1 contains=@htmlTop | |
170 syn region htmlBoldItalicUnderline contained start="<u\>" end="</u\_s*>"me=s-1 contains=@htmlTop,htmlBoldUnderlineItalic | |
7 | 171 |
16267 | 172 syn region htmlUnderline start="<u\>" end="</u\_s*>"me=s-1 contains=@htmlTop,htmlUnderlineBold,htmlUnderlineItalic |
173 syn region htmlUnderlineBold contained start="<b\>" end="</b\_s*>"me=s-1 contains=@htmlTop,htmlUnderlineBoldItalic | |
174 syn region htmlUnderlineBold contained start="<strong\>" end="</strong\_s*>"me=s-1 contains=@htmlTop,htmlUnderlineBoldItalic | |
175 syn region htmlUnderlineItalic contained start="<i\>" end="</i\_s*>"me=s-1 contains=@htmlTop,htmlUnderlineItalicBold | |
176 syn region htmlUnderlineItalic contained start="<em\>" end="</em\_s*>"me=s-1 contains=@htmlTop,htmlUnderlineItalicBold | |
177 syn region htmlUnderlineItalicBold contained start="<b\>" end="</b\_s*>"me=s-1 contains=@htmlTop | |
178 syn region htmlUnderlineItalicBold contained start="<strong\>" end="</strong\_s*>"me=s-1 contains=@htmlTop | |
179 syn region htmlUnderlineBoldItalic contained start="<i\>" end="</i\_s*>"me=s-1 contains=@htmlTop | |
180 syn region htmlUnderlineBoldItalic contained start="<em\>" end="</em\_s*>"me=s-1 contains=@htmlTop | |
7 | 181 |
16267 | 182 syn region htmlItalic start="<i\>" end="</i\_s*>"me=s-1 contains=@htmlTop,htmlItalicBold,htmlItalicUnderline |
183 syn region htmlItalic start="<em\>" end="</em\_s*>"me=s-1 contains=@htmlTop | |
184 syn region htmlItalicBold contained start="<b\>" end="</b\_s*>"me=s-1 contains=@htmlTop,htmlItalicBoldUnderline | |
185 syn region htmlItalicBold contained start="<strong\>" end="</strong\_s*>"me=s-1 contains=@htmlTop,htmlItalicBoldUnderline | |
186 syn region htmlItalicBoldUnderline contained start="<u\>" end="</u\_s*>"me=s-1 contains=@htmlTop | |
187 syn region htmlItalicUnderline contained start="<u\>" end="</u\_s*>"me=s-1 contains=@htmlTop,htmlItalicUnderlineBold | |
188 syn region htmlItalicUnderlineBold contained start="<b\>" end="</b\_s*>"me=s-1 contains=@htmlTop | |
189 syn region htmlItalicUnderlineBold contained start="<strong\>" end="</strong\_s*>"me=s-1 contains=@htmlTop | |
7 | 190 |
3854 | 191 syn match htmlLeadingSpace "^\s\+" contained |
16267 | 192 syn region htmlLink start="<a\>\_[^>]*\<href\>" end="</a\_s*>"me=s-1 contains=@Spell,htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLeadingSpace,javaScript,@htmlPreproc |
193 syn region htmlH1 start="<h1\>" end="</h1\_s*>"me=s-1 contains=@htmlTop | |
194 syn region htmlH2 start="<h2\>" end="</h2\_s*>"me=s-1 contains=@htmlTop | |
195 syn region htmlH3 start="<h3\>" end="</h3\_s*>"me=s-1 contains=@htmlTop | |
196 syn region htmlH4 start="<h4\>" end="</h4\_s*>"me=s-1 contains=@htmlTop | |
197 syn region htmlH5 start="<h5\>" end="</h5\_s*>"me=s-1 contains=@htmlTop | |
198 syn region htmlH6 start="<h6\>" end="</h6\_s*>"me=s-1 contains=@htmlTop | |
199 syn region htmlHead start="<head\>" end="</head\_s*>"me=s-1 end="<body\>"me=s-1 end="<h[1-6]\>"me=s-1 contains=htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLink,htmlTitle,javaScript,cssStyle,@htmlPreproc | |
200 syn region htmlTitle start="<title\>" end="</title\_s*>"me=s-1 contains=htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,javaScript,@htmlPreproc | |
7 | 201 endif |
202 | |
829 | 203 syn keyword htmlTagName contained noscript |
7 | 204 syn keyword htmlSpecialTagName contained script style |
205 if main_syntax != 'java' || exists("java_javascript") | |
206 " JAVA SCRIPT | |
829 | 207 syn include @htmlJavaScript syntax/javascript.vim |
7 | 208 unlet b:current_syntax |
6476 | 209 syn region javaScript start=+<script\_[^>]*>+ keepend end=+</script\_[^>]*>+me=s-1 contains=@htmlJavaScript,htmlCssStyleComment,htmlScriptTag,@htmlPreproc |
3854 | 210 syn region htmlScriptTag contained start=+<script+ end=+>+ fold contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
211 hi def link htmlScriptTag htmlTag |
7 | 212 |
213 " html events (i.e. arguments that include javascript commands) | |
214 if exists("html_extended_events") | |
829 | 215 syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*'+ end=+'+ contains=htmlEventSQ |
216 syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*"+ end=+"+ contains=htmlEventDQ | |
7 | 217 else |
829 | 218 syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*'+ end=+'+ keepend contains=htmlEventSQ |
219 syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*"+ end=+"+ keepend contains=htmlEventDQ | |
7 | 220 endif |
829 | 221 syn region htmlEventSQ contained start=+'+ms=s+1 end=+'+me=s-1 contains=@htmlJavaScript |
222 syn region htmlEventDQ contained start=+"+ms=s+1 end=+"+me=s-1 contains=@htmlJavaScript | |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
223 hi def link htmlEventSQ htmlEvent |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
224 hi def link htmlEventDQ htmlEvent |
7 | 225 |
226 " a javascript expression is used as an arg value | |
227 syn region javaScriptExpression contained start=+&{+ keepend end=+};+ contains=@htmlJavaScript,@htmlPreproc | |
228 endif | |
229 | |
230 if main_syntax != 'java' || exists("java_vb") | |
231 " VB SCRIPT | |
829 | 232 syn include @htmlVbScript syntax/vb.vim |
7 | 233 unlet b:current_syntax |
6476 | 234 syn region javaScript start=+<script \_[^>]*language *=\_[^>]*vbscript\_[^>]*>+ keepend end=+</script\_[^>]*>+me=s-1 contains=@htmlVbScript,htmlCssStyleComment,htmlScriptTag,@htmlPreproc |
7 | 235 endif |
236 | |
237 syn cluster htmlJavaScript add=@htmlPreproc | |
238 | |
239 if main_syntax != 'java' || exists("java_css") | |
240 " embedded style sheets | |
829 | 241 syn keyword htmlArg contained media |
242 syn include @htmlCss syntax/css.vim | |
7 | 243 unlet b:current_syntax |
244 syn region cssStyle start=+<style+ keepend end=+</style>+ contains=@htmlCss,htmlTag,htmlEndTag,htmlCssStyleComment,@htmlPreproc | |
245 syn match htmlCssStyleComment contained "\(<!--\|-->\)" | |
246 syn region htmlCssDefinition matchgroup=htmlArg start='style="' keepend matchgroup=htmlString end='"' contains=css.*Attr,css.*Prop,cssComment,cssLength,cssColor,cssURL,cssImportant,cssError,cssString,@htmlPreproc | |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
247 hi def link htmlStyleArg htmlString |
7 | 248 endif |
249 | |
250 if main_syntax == "html" | |
251 " synchronizing (does not always work if a comment includes legal | |
252 " html tags, but doing it right would mean to always start | |
253 " at the first line, which is too slow) | |
254 syn sync match htmlHighlight groupthere NONE "<[/a-zA-Z]" | |
255 syn sync match htmlHighlight groupthere javaScript "<script" | |
256 syn sync match htmlHighlightSkip "^.*['\"].*$" | |
257 syn sync minlines=10 | |
258 endif | |
259 | |
260 " The default highlighting. | |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
261 hi def link htmlTag Function |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
262 hi def link htmlEndTag Identifier |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
263 hi def link htmlArg Type |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
264 hi def link htmlTagName htmlStatement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
265 hi def link htmlSpecialTagName Exception |
24103 | 266 hi def link htmlValue String |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
267 hi def link htmlSpecialChar Special |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
268 |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
269 if !exists("html_no_rendering") |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
270 hi def link htmlH1 Title |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
271 hi def link htmlH2 htmlH1 |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
272 hi def link htmlH3 htmlH2 |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
273 hi def link htmlH4 htmlH3 |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
274 hi def link htmlH5 htmlH4 |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
275 hi def link htmlH6 htmlH5 |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
276 hi def link htmlHead PreProc |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
277 hi def link htmlTitle Title |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
278 hi def link htmlBoldItalicUnderline htmlBoldUnderlineItalic |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
279 hi def link htmlUnderlineBold htmlBoldUnderline |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
280 hi def link htmlUnderlineItalicBold htmlBoldUnderlineItalic |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
281 hi def link htmlUnderlineBoldItalic htmlBoldUnderlineItalic |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
282 hi def link htmlItalicUnderline htmlUnderlineItalic |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
283 hi def link htmlItalicBold htmlBoldItalic |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
284 hi def link htmlItalicBoldUnderline htmlBoldUnderlineItalic |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
285 hi def link htmlItalicUnderlineBold htmlBoldUnderlineItalic |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
286 hi def link htmlLink Underlined |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
287 hi def link htmlLeadingSpace None |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
288 if !exists("html_my_rendering") |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
289 hi def htmlBold term=bold cterm=bold gui=bold |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
290 hi def htmlBoldUnderline term=bold,underline cterm=bold,underline gui=bold,underline |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
291 hi def htmlBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
292 hi def htmlBoldUnderlineItalic term=bold,italic,underline cterm=bold,italic,underline gui=bold,italic,underline |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
293 hi def htmlUnderline term=underline cterm=underline gui=underline |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
294 hi def htmlUnderlineItalic term=italic,underline cterm=italic,underline gui=italic,underline |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
295 hi def htmlItalic term=italic cterm=italic gui=italic |
12756
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
10734
diff
changeset
|
296 if v:version > 800 || v:version == 800 && has("patch1038") |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
10734
diff
changeset
|
297 hi def htmlStrike term=strikethrough cterm=strikethrough gui=strikethrough |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
10734
diff
changeset
|
298 else |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
10734
diff
changeset
|
299 hi def htmlStrike term=underline cterm=underline gui=underline |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
10734
diff
changeset
|
300 endif |
7 | 301 endif |
302 endif | |
303 | |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
304 hi def link htmlPreStmt PreProc |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
305 hi def link htmlPreError Error |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
306 hi def link htmlPreProc PreProc |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
307 hi def link htmlPreAttr String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
308 hi def link htmlPreProcAttrName PreProc |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
309 hi def link htmlPreProcAttrError Error |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
310 hi def link htmlString String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
311 hi def link htmlStatement Statement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
312 hi def link htmlComment Comment |
24103 | 313 hi def link htmlCommentNested htmlError |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
314 hi def link htmlCommentError htmlError |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
315 hi def link htmlTagError htmlError |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
316 hi def link htmlEvent javaScript |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
317 hi def link htmlError Error |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
318 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
319 hi def link javaScript Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
320 hi def link javaScriptExpression javaScript |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
321 hi def link htmlCssStyleComment Comment |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
322 hi def link htmlCssDefinition Special |
7 | 323 |
324 let b:current_syntax = "html" | |
325 | |
326 if main_syntax == 'html' | |
327 unlet main_syntax | |
328 endif | |
329 | |
3854 | 330 let &cpo = s:cpo_save |
331 unlet s:cpo_save | |
7 | 332 " vim: ts=8 |