Mercurial > vim
annotate runtime/syntax/smil.vim @ 22662:0f6e0cc4e927
Added tag v8.2.1879 for changeset c6b17787a38f9c6275cf9934f67abce7fb83427e
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 21 Oct 2020 16:45:04 +0200 |
parents | 46763b01cd9a |
children |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: SMIL (Synchronized Multimedia Integration Language) | |
3 " Maintainer: Herve Foucher <Herve.Foucher@helio.org> | |
4 " URL: http://www.helio.org/vim/syntax/smil.vim | |
3312 | 5 " Last Change: 2012 Feb 03 by Thilo Six |
7 | 6 |
7 " To learn more about SMIL, please refer to http://www.w3.org/AudioVideo/ | |
8 " and to http://www.helio.org/products/smil/tutorial/ | |
9 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3312
diff
changeset
|
10 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3312
diff
changeset
|
11 if exists("b:current_syntax") |
7 | 12 finish |
13 endif | |
14 | |
3312 | 15 let s:cpo_save = &cpo |
16 set cpo&vim | |
17 | |
7 | 18 " SMIL is case sensitive |
19 syn case match | |
20 | |
21 " illegal characters | |
22 syn match smilError "[<>&]" | |
23 syn match smilError "[()&]" | |
24 | |
25 if !exists("main_syntax") | |
26 let main_syntax = 'smil' | |
27 endif | |
28 | |
29 " tags | |
30 syn match smilSpecial contained "\\\d\d\d\|\\." | |
31 syn match smilSpecial contained "(" | |
32 syn match smilSpecial contained "id(" | |
33 syn match smilSpecial contained ")" | |
34 syn keyword smilSpecial contained remove freeze true false on off overdub caption new pause replace | |
35 syn keyword smilSpecial contained first last | |
36 syn keyword smilSpecial contained fill meet slice scroll hidden | |
37 syn region smilString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=smilSpecial | |
38 syn region smilString contained start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=smilSpecial | |
39 syn match smilValue contained "=[\t ]*[^'" \t>][^ \t>]*"hs=s+1 | |
40 syn region smilEndTag start=+</+ end=+>+ contains=smilTagN,smilTagError | |
41 syn region smilTag start=+<[^/]+ end=+>+ contains=smilTagN,smilString,smilArg,smilValue,smilTagError,smilEvent,smilCssDefinition | |
42 syn match smilTagN contained +<\s*[-a-zA-Z0-9]\++ms=s+1 contains=smilTagName,smilSpecialTagName | |
43 syn match smilTagN contained +</\s*[-a-zA-Z0-9]\++ms=s+2 contains=smilTagName,smilSpecialTagName | |
44 syn match smilTagError contained "[^>]<"ms=s+1 | |
45 | |
46 " tag names | |
47 syn keyword smilTagName contained smil head body anchor a switch region layout meta | |
48 syn match smilTagName contained "root-layout" | |
49 syn keyword smilTagName contained par seq | |
50 syn keyword smilTagName contained animation video img audio ref text textstream | |
51 syn match smilTagName contained "\<\(head\|body\)\>" | |
52 | |
53 | |
54 " legal arg names | |
55 syn keyword smilArg contained dur begin end href target id coords show title abstract author copyright alt | |
56 syn keyword smilArg contained left top width height fit src name content fill longdesc repeat type | |
57 syn match smilArg contained "z-index" | |
58 syn match smilArg contained " end-sync" | |
59 syn match smilArg contained " region" | |
60 syn match smilArg contained "background-color" | |
61 syn match smilArg contained "system-bitrate" | |
62 syn match smilArg contained "system-captions" | |
63 syn match smilArg contained "system-overdub-or-caption" | |
64 syn match smilArg contained "system-language" | |
65 syn match smilArg contained "system-required" | |
66 syn match smilArg contained "system-screen-depth" | |
67 syn match smilArg contained "system-screen-size" | |
68 syn match smilArg contained "clip-begin" | |
69 syn match smilArg contained "clip-end" | |
70 syn match smilArg contained "skip-content" | |
71 | |
72 | |
73 " SMIL Boston ext. | |
74 " This are new SMIL functionnalities seen on www.w3.org on August 3rd 1999 | |
75 | |
76 " Animation | |
77 syn keyword smilTagName contained animate set move | |
78 syn keyword smilArg contained calcMode from to by additive values origin path | |
79 syn keyword smilArg contained accumulate hold attribute | |
80 syn match smilArg contained "xml:link" | |
81 syn keyword smilSpecial contained discrete linear spline parent layout | |
82 syn keyword smilSpecial contained top left simple | |
83 | |
84 " Linking | |
85 syn keyword smilTagName contained area | |
86 syn keyword smilArg contained actuate behavior inline sourceVolume | |
87 syn keyword smilArg contained destinationVolume destinationPlaystate tabindex | |
88 syn keyword smilArg contained class style lang dir onclick ondblclick onmousedown onmouseup onmouseover onmousemove onmouseout onkeypress onkeydown onkeyup shape nohref accesskey onfocus onblur | |
89 syn keyword smilSpecial contained play pause stop rect circ poly child par seq | |
90 | |
91 " Media Object | |
92 syn keyword smilTagName contained rtpmap | |
93 syn keyword smilArg contained port transport encoding payload clipBegin clipEnd | |
94 syn match smilArg contained "fmt-list" | |
95 | |
96 " Timing and Synchronization | |
97 syn keyword smilTagName contained excl | |
98 syn keyword smilArg contained beginEvent endEvent eventRestart endSync repeatCount repeatDur | |
99 syn keyword smilArg contained syncBehavior syncTolerance | |
100 syn keyword smilSpecial contained canSlip locked | |
101 | |
102 " special characters | |
103 syn match smilSpecialChar "&[^;]*;" | |
104 | |
105 if exists("smil_wrong_comments") | |
106 syn region smilComment start=+<!--+ end=+-->+ | |
107 else | |
108 syn region smilComment start=+<!+ end=+>+ contains=smilCommentPart,smilCommentError | |
109 syn match smilCommentError contained "[^><!]" | |
110 syn region smilCommentPart contained start=+--+ end=+--+ | |
111 endif | |
112 syn region smilComment start=+<!DOCTYPE+ keepend end=+>+ | |
113 | |
114 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3312
diff
changeset
|
115 " Only when an item doesn't have highlighting yet |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3312
diff
changeset
|
116 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
117 hi def link smilTag Function |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
118 hi def link smilEndTag Identifier |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
119 hi def link smilArg Type |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
120 hi def link smilTagName smilStatement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
121 hi def link smilSpecialTagName Exception |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
122 hi def link smilValue Value |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
123 hi def link smilSpecialChar Special |
7 | 124 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
125 hi def link smilSpecial Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
126 hi def link smilSpecialChar Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
127 hi def link smilString String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
128 hi def link smilStatement Statement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
129 hi def link smilComment Comment |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
130 hi def link smilCommentPart Comment |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
131 hi def link smilPreProc PreProc |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
132 hi def link smilValue String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
133 hi def link smilCommentError smilError |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
134 hi def link smilTagError smilError |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
135 hi def link smilError Error |
7 | 136 |
137 | |
138 let b:current_syntax = "smil" | |
139 | |
140 if main_syntax == 'smil' | |
141 unlet main_syntax | |
142 endif | |
143 | |
3312 | 144 let &cpo = s:cpo_save |
145 unlet s:cpo_save | |
7 | 146 " vim: ts=8 |