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