Mercurial > vim
annotate runtime/syntax/webmacro.vim @ 21608:24cb89db078d v8.2.1354
patch 8.2.1354: test 59 is old style
Commit: https://github.com/vim/vim/commit/aa970abd0a987de96321d33db82f70bbceac931b
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Aug 2 16:10:39 2020 +0200
patch 8.2.1354: test 59 is old style
Problem: Test 59 is old style.
Solution: Convert into a new style test. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/6604)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 02 Aug 2020 16:15:03 +0200 |
parents | 46763b01cd9a |
children | c58baa6d6dda |
rev | line source |
---|---|
7 | 1 " WebMacro syntax file |
2 " Language: WebMacro | |
3 " Maintainer: Claudio Fleiner <claudio@fleiner.com> | |
4 " URL: http://www.fleiner.com/vim/syntax/webmacro.vim | |
5 " Last Change: 2003 May 11 | |
6 | |
7 " webmacro is a nice little language that you should | |
8 " check out if you use java servlets. | |
9 " webmacro: http://www.webmacro.org | |
10 | |
11 " For version 5.x: Clear all syntax items | |
12 " For version 6.x: Quit when a syntax file was already loaded | |
13 if !exists("main_syntax") | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
14 " 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
|
15 if exists("b:current_syntax") |
7 | 16 finish |
17 endif | |
18 let main_syntax = 'webmacro' | |
19 endif | |
20 | |
21 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
22 runtime! syntax/html.vim |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
23 unlet b:current_syntax |
7 | 24 |
25 syn cluster htmlPreProc add=webmacroIf,webmacroUse,webmacroBraces,webmacroParse,webmacroInclude,webmacroSet,webmacroForeach,webmacroComment | |
26 | |
27 syn match webmacroVariable "\$[a-zA-Z0-9.()]*;\=" | |
28 syn match webmacroNumber "[-+]\=\d\+[lL]\=" contained | |
29 syn keyword webmacroBoolean true false contained | |
30 syn match webmacroSpecial "\\." contained | |
31 syn region webmacroString contained start=+"+ end=+"+ contains=webmacroSpecial,webmacroVariable | |
32 syn region webmacroString contained start=+'+ end=+'+ contains=webmacroSpecial,webmacroVariable | |
33 syn region webmacroList contained matchgroup=Structure start="\[" matchgroup=Structure end="\]" contains=webmacroString,webmacroVariable,webmacroNumber,webmacroBoolean,webmacroList | |
34 | |
35 syn region webmacroIf start="#if" start="#else" end="{"me=e-1 contains=webmacroVariable,webmacroNumber,webmacroString,webmacroBoolean,webmacroList nextgroup=webmacroBraces | |
36 syn region webmacroForeach start="#foreach" end="{"me=e-1 contains=webmacroVariable,webmacroNumber,webmacroString,webmacroBoolean,webmacroList nextgroup=webmacroBraces | |
37 syn match webmacroSet "#set .*$" contains=webmacroVariable,webmacroNumber,webmacroNumber,webmacroBoolean,webmacroString,webmacroList | |
38 syn match webmacroInclude "#include .*$" contains=webmacroVariable,webmacroNumber,webmacroNumber,webmacroBoolean,webmacroString,webmacroList | |
39 syn match webmacroParse "#parse .*$" contains=webmacroVariable,webmacroNumber,webmacroNumber,webmacroBoolean,webmacroString,webmacroList | |
40 syn region webmacroUse matchgroup=PreProc start="#use .*" matchgroup=PreProc end="^-.*" contains=webmacroHash,@HtmlTop | |
41 syn region webmacroBraces matchgroup=Structure start="{" matchgroup=Structure end="}" contained transparent | |
42 syn match webmacroBracesError "[{}]" | |
43 syn match webmacroComment "##.*$" | |
44 syn match webmacroHash "[#{}\$]" contained | |
45 | |
46 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
47 " Only when an item doesn't have highlighting yet |
7 | 48 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
49 hi def link webmacroComment CommentTitle |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
50 hi def link webmacroVariable PreProc |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
51 hi def link webmacroIf webmacroStatement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
52 hi def link webmacroForeach webmacroStatement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
53 hi def link webmacroSet webmacroStatement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
54 hi def link webmacroInclude webmacroStatement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
55 hi def link webmacroParse webmacroStatement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
56 hi def link webmacroStatement Function |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
57 hi def link webmacroNumber Number |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
58 hi def link webmacroBoolean Boolean |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
59 hi def link webmacroSpecial Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
60 hi def link webmacroString String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
61 hi def link webmacroBracesError Error |
7 | 62 |
63 let b:current_syntax = "webmacro" | |
64 | |
65 if main_syntax == 'webmacro' | |
66 unlet main_syntax | |
67 endif |