Mercurial > vim
annotate runtime/syntax/mason.vim @ 11747:9dd958aba769 v8.0.0756
patch 8.0.0756: cannot build libvterm with MSVC
commit https://github.com/vim/vim/commit/2aeaf3fc013a3c4828d6e98a80e6a2e2d980f109
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jul 23 17:11:15 2017 +0200
patch 8.0.0756: cannot build libvterm with MSVC
Problem: Cannot build libvterm with MSVC.
Solution: Add an MSVC Makefile to libvterm. (Yasuhiro Matsumoto, closes
#1865)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 23 Jul 2017 17:15:03 +0200 |
parents | 43efa4f5a8ea |
children | d91cf2e26ef0 |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: Mason (Perl embedded in HTML) | |
3 " Maintainer: Andrew Smith <andrewdsmith@yahoo.com> | |
4 " Last change: 2003 May 11 | |
5 " URL: http://www.masonhq.com/editors/mason.vim | |
6 " | |
7 " This seems to work satisfactorily with html.vim and perl.vim for version 5.5. | |
8 " Please mail any fixes or improvements to the above address. Things that need | |
9 " doing include: | |
10 " | |
11 " - Add match for component names in <& &> blocks. | |
12 " - Add match for component names in <%def> and <%method> block delimiters. | |
13 " - Fix <%text> blocks to show HTML tags but ignore Mason tags. | |
14 " | |
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 | 18 finish |
19 endif | |
20 | |
21 " The HTML syntax file included below uses this variable. | |
22 " | |
23 if !exists("main_syntax") | |
24 let main_syntax = 'mason' | |
25 endif | |
26 | |
27 " First pull in the HTML syntax. | |
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 | 31 |
32 syn cluster htmlPreproc add=@masonTop | |
33 | |
34 " Now pull in the Perl syntax. | |
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 | 37 |
38 " It's hard to reduce down to the correct sub-set of Perl to highlight in some | |
39 " of these cases so I've taken the safe option of just using perlTop in all of | |
40 " them. If you have any suggestions, please let me know. | |
41 " | |
42 syn region masonLine matchgroup=Delimiter start="^%" end="$" contains=@perlTop | |
43 syn region masonExpr matchgroup=Delimiter start="<%" end="%>" contains=@perlTop | |
44 syn region masonPerl matchgroup=Delimiter start="<%perl>" end="</%perl>" contains=@perlTop | |
45 syn region masonComp keepend matchgroup=Delimiter start="<&" end="&>" contains=@perlTop | |
46 | |
47 syn region masonArgs matchgroup=Delimiter start="<%args>" end="</%args>" contains=@perlTop | |
48 | |
49 syn region masonInit matchgroup=Delimiter start="<%init>" end="</%init>" contains=@perlTop | |
50 syn region masonCleanup matchgroup=Delimiter start="<%cleanup>" end="</%cleanup>" contains=@perlTop | |
51 syn region masonOnce matchgroup=Delimiter start="<%once>" end="</%once>" contains=@perlTop | |
52 syn region masonShared matchgroup=Delimiter start="<%shared>" end="</%shared>" contains=@perlTop | |
53 | |
54 syn region masonDef matchgroup=Delimiter start="<%def[^>]*>" end="</%def>" contains=@htmlTop | |
55 syn region masonMethod matchgroup=Delimiter start="<%method[^>]*>" end="</%method>" contains=@htmlTop | |
56 | |
57 syn region masonFlags matchgroup=Delimiter start="<%flags>" end="</%flags>" contains=@perlTop | |
58 syn region masonAttr matchgroup=Delimiter start="<%attr>" end="</%attr>" contains=@perlTop | |
59 | |
60 syn region masonFilter matchgroup=Delimiter start="<%filter>" end="</%filter>" contains=@perlTop | |
61 | |
62 syn region masonDoc matchgroup=Delimiter start="<%doc>" end="</%doc>" | |
63 syn region masonText matchgroup=Delimiter start="<%text>" end="</%text>" | |
64 | |
65 syn cluster masonTop contains=masonLine,masonExpr,masonPerl,masonComp,masonArgs,masonInit,masonCleanup,masonOnce,masonShared,masonDef,masonMethod,masonFlags,masonAttr,masonFilter,masonDoc,masonText | |
66 | |
67 " Set up default highlighting. Almost all of this is done in the included | |
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 | 70 |
71 let b:current_syntax = "mason" | |
72 | |
73 if main_syntax == 'mason' | |
74 unlet main_syntax | |
75 endif |