annotate runtime/syntax/smil.vim @ 32082:775d7d500959 v9.0.1372

patch 9.0.1372: test for 'toolbariconsize' may fail Commit: https://github.com/vim/vim/commit/db1887ce40452daea8c4e8734ec64202e5f24130 Author: James McCoy <jamessan@jamessan.com> Date: Thu Mar 2 18:36:33 2023 +0000 patch 9.0.1372: test for 'toolbariconsize' may fail Problem: Test for 'toolbariconsize' may fail. Solution: Only test 'toolbariconsize' when it is supported. (James McCoy, closes #12095)
author Bram Moolenaar <Bram@vim.org>
date Thu, 02 Mar 2023 19:45:03 +0100
parents 46763b01cd9a
children
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
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14
3312
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
15 let s:cpo_save = &cpo
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
16 set cpo&vim
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
17
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 " SMIL is case sensitive
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 " illegal characters
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn match smilError "[<>&]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn match smilError "[()&]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 if !exists("main_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 let main_syntax = 'smil'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 " tags
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn match smilSpecial contained "\\\d\d\d\|\\."
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn match smilSpecial contained "("
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn match smilSpecial contained "id("
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn match smilSpecial contained ")"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 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
35 syn keyword smilSpecial contained first last
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn keyword smilSpecial contained fill meet slice scroll hidden
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn region smilString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=smilSpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn region smilString contained start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=smilSpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn match smilValue contained "=[\t ]*[^'" \t>][^ \t>]*"hs=s+1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn region smilEndTag start=+</+ end=+>+ contains=smilTagN,smilTagError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn region smilTag start=+<[^/]+ end=+>+ contains=smilTagN,smilString,smilArg,smilValue,smilTagError,smilEvent,smilCssDefinition
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 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
43 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
44 syn match smilTagError contained "[^>]<"ms=s+1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 " tag names
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn keyword smilTagName contained smil head body anchor a switch region layout meta
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn match smilTagName contained "root-layout"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn keyword smilTagName contained par seq
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn keyword smilTagName contained animation video img audio ref text textstream
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn match smilTagName contained "\<\(head\|body\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 " legal arg names
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 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
56 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
57 syn match smilArg contained "z-index"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn match smilArg contained " end-sync"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 syn match smilArg contained " region"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn match smilArg contained "background-color"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn match smilArg contained "system-bitrate"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn match smilArg contained "system-captions"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn match smilArg contained "system-overdub-or-caption"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn match smilArg contained "system-language"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn match smilArg contained "system-required"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn match smilArg contained "system-screen-depth"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 syn match smilArg contained "system-screen-size"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 syn match smilArg contained "clip-begin"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 syn match smilArg contained "clip-end"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 syn match smilArg contained "skip-content"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 " SMIL Boston ext.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 " This are new SMIL functionnalities seen on www.w3.org on August 3rd 1999
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 " Animation
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 syn keyword smilTagName contained animate set move
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 syn keyword smilArg contained calcMode from to by additive values origin path
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 syn keyword smilArg contained accumulate hold attribute
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 syn match smilArg contained "xml:link"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 syn keyword smilSpecial contained discrete linear spline parent layout
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 syn keyword smilSpecial contained top left simple
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 " Linking
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 syn keyword smilTagName contained area
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 syn keyword smilArg contained actuate behavior inline sourceVolume
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 syn keyword smilArg contained destinationVolume destinationPlaystate tabindex
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 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
89 syn keyword smilSpecial contained play pause stop rect circ poly child par seq
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 " Media Object
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 syn keyword smilTagName contained rtpmap
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 syn keyword smilArg contained port transport encoding payload clipBegin clipEnd
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 syn match smilArg contained "fmt-list"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 " Timing and Synchronization
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 syn keyword smilTagName contained excl
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 syn keyword smilArg contained beginEvent endEvent eventRestart endSync repeatCount repeatDur
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 syn keyword smilArg contained syncBehavior syncTolerance
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 syn keyword smilSpecial contained canSlip locked
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 " special characters
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 syn match smilSpecialChar "&[^;]*;"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 if exists("smil_wrong_comments")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 syn region smilComment start=+<!--+ end=+-->+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 syn region smilComment start=+<!+ end=+>+ contains=smilCommentPart,smilCommentError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 syn match smilCommentError contained "[^><!]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 syn region smilCommentPart contained start=+--+ end=+--+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 syn region smilComment start=+<!DOCTYPE+ keepend end=+>+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138 let b:current_syntax = "smil"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140 if main_syntax == 'smil'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141 unlet main_syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143
3312
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
144 let &cpo = s:cpo_save
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
145 unlet s:cpo_save
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146 " vim: ts=8