annotate runtime/syntax/smil.vim @ 7709:b2e910bfdce8

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