annotate runtime/syntax/mason.vim @ 11006:b3601a8eb679 v8.0.0392

patch 8.0.0392: GUI test fails with Athena and Motif commit https://github.com/vim/vim/commit/e0c31f6a304496b597a51ce98af419ec815bec74 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Mar 1 15:07:05 2017 +0100 patch 8.0.0392: GUI test fails with Athena and Motif Problem: GUI test fails with Athena and Motif. Solution: Add test_ignore_error(). Use it to ignore the "failed to create input context" error.
author Christian Brabandt <cb@256bit.org>
date Wed, 01 Mar 2017 15:15:05 +0100
parents 43efa4f5a8ea
children d91cf2e26ef0
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: Mason (Perl embedded in HTML)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Andrew Smith <andrewdsmith@yahoo.com>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Last change: 2003 May 11
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " URL: http://www.masonhq.com/editors/mason.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " This seems to work satisfactorily with html.vim and perl.vim for version 5.5.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " Please mail any fixes or improvements to the above address. Things that need
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " doing include:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " - Add match for component names in <& &> blocks.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 " - Add match for component names in <%def> and <%method> block delimiters.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 " - Fix <%text> blocks to show HTML tags but ignore Mason tags.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
16 " 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
17 if exists("b:current_syntax")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 " The HTML syntax file included below uses this variable.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 if !exists("main_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 let main_syntax = 'mason'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 " First pull in the HTML syntax.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 "
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
29 runtime! syntax/html.vim
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
30 unlet b:current_syntax
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn cluster htmlPreproc add=@masonTop
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 " Now pull in the Perl syntax.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 "
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
36 syn include @perlTop syntax/perl.vim
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 " It's hard to reduce down to the correct sub-set of Perl to highlight in some
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 " of these cases so I've taken the safe option of just using perlTop in all of
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 " them. If you have any suggestions, please let me know.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn region masonLine matchgroup=Delimiter start="^%" end="$" contains=@perlTop
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn region masonExpr matchgroup=Delimiter start="<%" end="%>" contains=@perlTop
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn region masonPerl matchgroup=Delimiter start="<%perl>" end="</%perl>" contains=@perlTop
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn region masonComp keepend matchgroup=Delimiter start="<&" end="&>" contains=@perlTop
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn region masonArgs matchgroup=Delimiter start="<%args>" end="</%args>" contains=@perlTop
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn region masonInit matchgroup=Delimiter start="<%init>" end="</%init>" contains=@perlTop
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn region masonCleanup matchgroup=Delimiter start="<%cleanup>" end="</%cleanup>" contains=@perlTop
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn region masonOnce matchgroup=Delimiter start="<%once>" end="</%once>" contains=@perlTop
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn region masonShared matchgroup=Delimiter start="<%shared>" end="</%shared>" contains=@perlTop
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn region masonDef matchgroup=Delimiter start="<%def[^>]*>" end="</%def>" contains=@htmlTop
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn region masonMethod matchgroup=Delimiter start="<%method[^>]*>" end="</%method>" contains=@htmlTop
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syn region masonFlags matchgroup=Delimiter start="<%flags>" end="</%flags>" contains=@perlTop
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn region masonAttr matchgroup=Delimiter start="<%attr>" end="</%attr>" contains=@perlTop
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn region masonFilter matchgroup=Delimiter start="<%filter>" end="</%filter>" contains=@perlTop
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn region masonDoc matchgroup=Delimiter start="<%doc>" end="</%doc>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn region masonText matchgroup=Delimiter start="<%text>" end="</%text>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn cluster masonTop contains=masonLine,masonExpr,masonPerl,masonComp,masonArgs,masonInit,masonCleanup,masonOnce,masonShared,masonDef,masonMethod,masonFlags,masonAttr,masonFilter,masonDoc,masonText
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 " Set up default highlighting. Almost all of this is done in the included
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 " syntax files.
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
69 hi def link masonDoc Comment
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 let b:current_syntax = "mason"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 if main_syntax == 'mason'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 unlet main_syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 endif