Mercurial > vim
annotate runtime/syntax/spyce.vim @ 14707:5cb5b079ad90
Added tag v8.1.0365 for changeset 2c0f454fcdc94c0e633f1f509e9e266e30e04581
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 10 Sep 2018 22:15:05 +0200 |
parents | 43efa4f5a8ea |
children |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: SPYCE | |
3 " Maintainer: Rimon Barr <rimon AT acm DOT org> | |
4 " URL: http://spyce.sourceforge.net | |
2034 | 5 " Last Change: 2009 Nov 11 |
7 | 6 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2034
diff
changeset
|
7 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2034
diff
changeset
|
8 if exists("b:current_syntax") |
7 | 9 finish |
10 endif | |
11 | |
12 " we define it here so that included files can test for it | |
13 if !exists("main_syntax") | |
14 let main_syntax='spyce' | |
15 endif | |
16 | |
17 " Read the HTML syntax to start with | |
18 let b:did_indent = 1 " don't perform HTML indentation! | |
19 let html_no_rendering = 1 " do not render <b>,<i>, etc... | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2034
diff
changeset
|
20 runtime! syntax/html.vim |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2034
diff
changeset
|
21 unlet b:current_syntax |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2034
diff
changeset
|
22 syntax spell default " added by Bram |
7 | 23 |
24 " include python | |
25 syn include @Python <sfile>:p:h/python.vim | |
26 syn include @Html <sfile>:p:h/html.vim | |
27 | |
28 " spyce definitions | |
29 syn keyword spyceDirectiveKeyword include compact module import contained | |
30 syn keyword spyceDirectiveArg name names file contained | |
31 syn region spyceDirectiveString start=+"+ end=+"+ contained | |
32 syn match spyceDirectiveValue "=[\t ]*[^'", \t>][^, \t>]*"hs=s+1 contained | |
33 | |
34 syn match spyceBeginErrorS ,\[\[, | |
35 syn match spyceBeginErrorA ,<%, | |
36 syn cluster spyceBeginError contains=spyceBeginErrorS,spyceBeginErrorA | |
37 syn match spyceEndErrorS ,\]\], | |
38 syn match spyceEndErrorA ,%>, | |
39 syn cluster spyceEndError contains=spyceEndErrorS,spyceEndErrorA | |
40 | |
41 syn match spyceEscBeginS ,\\\[\[, | |
42 syn match spyceEscBeginA ,\\<%, | |
43 syn cluster spyceEscBegin contains=spyceEscBeginS,spyceEscBeginA | |
44 syn match spyceEscEndS ,\\\]\], | |
45 syn match spyceEscEndA ,\\%>, | |
46 syn cluster spyceEscEnd contains=spyceEscEndS,spyceEscEndA | |
47 syn match spyceEscEndCommentS ,--\\\]\], | |
48 syn match spyceEscEndCommentA ,--\\%>, | |
49 syn cluster spyceEscEndComment contains=spyceEscEndCommentS,spyceEscEndCommentA | |
50 | |
51 syn region spyceStmtS matchgroup=spyceStmtDelim start=,\[\[, end=,\]\], contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend | |
52 syn region spyceStmtA matchgroup=spyceStmtDelim start=,<%, end=,%>, contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend | |
53 syn region spyceChunkS matchgroup=spyceChunkDelim start=,\[\[\\, end=,\]\], contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend | |
54 syn region spyceChunkA matchgroup=spyceChunkDelim start=,<%\\, end=,%>, contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend | |
55 syn region spyceEvalS matchgroup=spyceEvalDelim start=,\[\[=, end=,\]\], contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend | |
56 syn region spyceEvalA matchgroup=spyceEvalDelim start=,<%=, end=,%>, contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend | |
57 syn region spyceDirectiveS matchgroup=spyceDelim start=,\[\[\., end=,\]\], contains=spyceBeginError,spyceDirectiveKeyword,spyceDirectiveArg,spyceDirectiveValue,spyceDirectiveString keepend | |
58 syn region spyceDirectiveA matchgroup=spyceDelim start=,<%@, end=,%>, contains=spyceBeginError,spyceDirectiveKeyword,spyceDirectiveArg,spyceDirectiveValue,spyceDirectiveString keepend | |
59 syn region spyceCommentS matchgroup=spyceCommentDelim start=,\[\[--, end=,--\]\], | |
60 syn region spyceCommentA matchgroup=spyceCommentDelim start=,<%--, end=,--%>, | |
61 syn region spyceLambdaS matchgroup=spyceLambdaDelim start=,\[\[spy!\?, end=,\]\], contains=@Html,@spyce extend | |
62 syn region spyceLambdaA matchgroup=spyceLambdaDelim start=,<%spy!\?, end=,%>, contains=@Html,@spyce extend | |
63 | |
64 syn cluster spyce contains=spyceStmtS,spyceStmtA,spyceChunkS,spyceChunkA,spyceEvalS,spyceEvalA,spyceCommentS,spyceCommentA,spyceDirectiveS,spyceDirectiveA | |
65 | |
66 syn cluster htmlPreproc contains=@spyce | |
67 | |
68 hi link spyceDirectiveKeyword Special | |
69 hi link spyceDirectiveArg Type | |
70 hi link spyceDirectiveString String | |
71 hi link spyceDirectiveValue String | |
72 | |
73 hi link spyceDelim Special | |
74 hi link spyceStmtDelim spyceDelim | |
75 hi link spyceChunkDelim spyceDelim | |
76 hi link spyceEvalDelim spyceDelim | |
77 hi link spyceLambdaDelim spyceDelim | |
78 hi link spyceCommentDelim Comment | |
79 | |
80 hi link spyceBeginErrorS Error | |
81 hi link spyceBeginErrorA Error | |
82 hi link spyceEndErrorS Error | |
83 hi link spyceEndErrorA Error | |
84 | |
85 hi link spyceStmtS spyce | |
86 hi link spyceStmtA spyce | |
87 hi link spyceChunkS spyce | |
88 hi link spyceChunkA spyce | |
89 hi link spyceEvalS spyce | |
90 hi link spyceEvalA spyce | |
91 hi link spyceDirectiveS spyce | |
92 hi link spyceDirectiveA spyce | |
93 hi link spyceCommentS Comment | |
94 hi link spyceCommentA Comment | |
95 hi link spyceLambdaS Normal | |
96 hi link spyceLambdaA Normal | |
97 | |
98 hi link spyce Statement | |
99 | |
100 let b:current_syntax = "spyce" | |
101 if main_syntax == 'spyce' | |
102 unlet main_syntax | |
103 endif | |
104 |