annotate runtime/syntax/wml.vim @ 12738:bd24b59084a1 v8.0.1247

patch 8.0.1247: not easy to find Debian build info commit https://github.com/vim/vim/commit/86b21bb3e7bc687fc74e127d78a89b411929716b Author: Bram Moolenaar <Bram@vim.org> Date: Thu Nov 2 18:10:00 2017 +0100 patch 8.0.1247: not easy to find Debian build info Problem: Not easy to find Debian build info. Solution: Add a badge in the README file. (Dominique Pelle)
author Christian Brabandt <cb@256bit.org>
date Thu, 02 Nov 2017 18:15:04 +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: WML - Website MetaLanguage
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Gerfried Fuchs <alfie@ist.org>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Filenames: *.wml
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " Last Change: 07 Feb 2002
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " URL: http://alfie.ist.org/software/vim/syntax/wml.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " Original Version: Craig Small <csmall@eye-net.com.au>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 " Comments are very welcome - but please make sure that you are commenting on
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " the latest version of this file.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 " SPAM is _NOT_ welcome - be ready to be reported!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 " If you are looking for the "Wireless Markup Language" syntax file,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 " please take a look at the wap.vim file done by Ralf Schandl, soon in a
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 " vim-package around your corner :)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
19 " quit when a syntax file was already loaded
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
20 if exists("b:current_syntax")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 " A lot of the web stuff looks like HTML so we load that first
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
26 runtime! syntax/html.vim
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 unlet b:current_syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 if !exists("main_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 let main_syntax = 'wml'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 " special character
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn match wmlNextLine "\\$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 " Redfine htmlTag
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn clear htmlTag
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn region htmlTag start=+<[^/<]+ end=+>+ contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 " Add in extra Arguments used by wml
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn keyword htmlTagName contained gfont imgbg imgdot lowsrc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn keyword htmlTagName contained navbar:define navbar:header
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn keyword htmlTagName contained navbar:footer navbar:prolog
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn keyword htmlTagName contained navbar:epilog navbar:button
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn keyword htmlTagName contained navbar:filter navbar:debug
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn keyword htmlTagName contained navbar:render
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn keyword htmlTagName contained preload rollover
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn keyword htmlTagName contained space hspace vspace over
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn keyword htmlTagName contained ps ds pi ein big sc spaced headline
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn keyword htmlTagName contained ue subheadline zwue verbcode
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn keyword htmlTagName contained isolatin pod sdf text url verbatim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn keyword htmlTagName contained xtable
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn keyword htmlTagName contained csmap fsview import box
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn keyword htmlTagName contained case:upper case:lower
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn keyword htmlTagName contained grid cell info lang: logo page
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syn keyword htmlTagName contained set-var restore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn keyword htmlTagName contained array:push array:show set-var ifdef
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 syn keyword htmlTagName contained say m4 symbol dump enter divert
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn keyword htmlTagName contained toc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn keyword htmlTagName contained wml card do refresh oneevent catch spawn
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 " The wml arguments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn keyword htmlArg contained adjust background base bdcolor bdspace
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn keyword htmlArg contained bdwidth complete copyright created crop
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 syn keyword htmlArg contained direction description domainname eperlfilter
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 syn keyword htmlArg contained file hint imgbase imgstar interchar interline
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 syn keyword htmlArg contained keephr keepindex keywords layout spacing
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 syn keyword htmlArg contained padding nonetscape noscale notag notypo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 syn keyword htmlArg contained onload oversrc pos select slices style
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 syn keyword htmlArg contained subselected txtcol_select txtcol_normal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 syn keyword htmlArg contained txtonly via
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn keyword htmlArg contained mode columns localsrc ordered
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 " Lines starting with an # are usually comments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 syn match wmlComment "^\s*#.*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 " The different exceptions to comments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 syn match wmlSharpBang "^#!.*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 syn match wmlUsed contained "\s\s*[A-Za-z:_-]*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 syn match wmlUse "^\s*#\s*use\s\+" contains=wmlUsed
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 syn match wmlInclude "^\s*#\s*include.+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 syn region wmlBody contained start=+<<+ end=+>>+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 syn match wmlLocationId contained "[A-Za-z]\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 syn region wmlLocation start=+<<+ end=+>>+ contains=wmlLocationId
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 "syn region wmlLocation start=+{#+ end=+#}+ contains=wmlLocationId
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 "syn region wmlLocationed contained start=+<<+ end=+>>+ contains=wmlLocationId
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 syn match wmlDivert "\.\.[a-zA-Z_]\+>>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 syn match wmlDivertEnd "<<\.\."
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 " new version
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 "syn match wmlDivert "{#[a-zA-Z_]\+#:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 "syn match wmlDivertEnd ":##}"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 syn match wmlDefineName contained "\s\+[A-Za-z-]\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 syn region htmlTagName start="\<\(define-tag\|define-region\)" end="\>" contains=wmlDefineName
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 " The perl include stuff
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 if main_syntax != 'perl'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 " Perl script
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
104 syn include @wmlPerlScript syntax/perl.vim
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 unlet b:current_syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 syn region perlScript start=+<perl>+ keepend end=+</perl>+ contains=@wmlPerlScript,wmlPerlTag
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 " eperl between '<:' and ':>' -- Alfie [1999-12-26]
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 syn region perlScript start=+<:+ keepend end=+:>+ contains=@wmlPerlScript,wmlPerlTag
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 syn match wmlPerlTag contained "</*perl>" contains=wmlPerlTagN
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 syn keyword wmlPerlTagN contained perl
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 hi link wmlPerlTag htmlTag
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 hi link wmlPerlTagN htmlStatement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 " verbatim tags -- don't highlight anything in between -- Alfie [2002-02-07]
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 syn region wmlVerbatimText start=+<verbatim>+ keepend end=+</verbatim>+ contains=wmlVerbatimTag
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 syn match wmlVerbatimTag contained "</*verbatim>" contains=wmlVerbatimTagN
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 syn keyword wmlVerbatimTagN contained verbatim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 hi link wmlVerbatimTag htmlTag
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 hi link wmlVerbatimTagN htmlStatement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 if main_syntax == "html"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 syn sync match wmlHighlight groupthere NONE "</a-zA-Z]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 syn sync match wmlHighlight groupthere perlScript "<perl>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 syn sync match wmlHighlightSkip "^.*['\"].*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 syn sync minlines=10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131 " Define the default highlighting.
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
132 " Only when an item doesn't have highlighting yet
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
134 hi def link wmlNextLine Special
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
135 hi def link wmlUse Include
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
136 hi def link wmlUsed String
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
137 hi def link wmlBody Special
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
138 hi def link wmlDiverted Label
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
139 hi def link wmlDivert Delimiter
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
140 hi def link wmlDivertEnd Delimiter
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
141 hi def link wmlLocationId Label
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
142 hi def link wmlLocation Delimiter
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
143 " hi def link wmlLocationed Delimiter
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
144 hi def link wmlDefineName String
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
145 hi def link wmlComment Comment
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
146 hi def link wmlInclude Include
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
147 hi def link wmlSharpBang PreProc
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150 let b:current_syntax = "wml"