Mercurial > vim
comparison runtime/syntax/spyce.vim @ 7:3fc0f57ecb91 v7.0001
updated for version 7.0001
author | vimboss |
---|---|
date | Sun, 13 Jun 2004 20:20:40 +0000 |
parents | |
children | 7bc41231fbc7 |
comparison
equal
deleted
inserted
replaced
6:c2daee826b8f | 7:3fc0f57ecb91 |
---|---|
1 " Vim syntax file | |
2 " Language: SPYCE | |
3 " Maintainer: Rimon Barr <rimon AT acm DOT org> | |
4 " URL: http://spyce.sourceforge.net | |
5 " Last Change: 2003 May 11 | |
6 | |
7 " For version 5.x: Clear all syntax items | |
8 " For version 6.x: Quit when a syntax file was already loaded | |
9 if version < 600 | |
10 syntax clear | |
11 elseif exists("b:current_syntax") | |
12 finish | |
13 endif | |
14 | |
15 " we define it here so that included files can test for it | |
16 if !exists("main_syntax") | |
17 let main_syntax='spyce' | |
18 endif | |
19 | |
20 " Read the HTML syntax to start with | |
21 let b:did_indent = 1 " don't perform HTML indentation! | |
22 let html_no_rendering = 1 " do not render <b>,<i>, etc... | |
23 if version < 600 | |
24 so <sfile>:p:h/html.vim | |
25 else | |
26 runtime! syntax/html.vim | |
27 unlet b:current_syntax | |
28 endif | |
29 | |
30 " include python | |
31 syn include @Python <sfile>:p:h/python.vim | |
32 syn include @Html <sfile>:p:h/html.vim | |
33 | |
34 " spyce definitions | |
35 syn keyword spyceDirectiveKeyword include compact module import contained | |
36 syn keyword spyceDirectiveArg name names file contained | |
37 syn region spyceDirectiveString start=+"+ end=+"+ contained | |
38 syn match spyceDirectiveValue "=[\t ]*[^'", \t>][^, \t>]*"hs=s+1 contained | |
39 | |
40 syn match spyceBeginErrorS ,\[\[, | |
41 syn match spyceBeginErrorA ,<%, | |
42 syn cluster spyceBeginError contains=spyceBeginErrorS,spyceBeginErrorA | |
43 syn match spyceEndErrorS ,\]\], | |
44 syn match spyceEndErrorA ,%>, | |
45 syn cluster spyceEndError contains=spyceEndErrorS,spyceEndErrorA | |
46 | |
47 syn match spyceEscBeginS ,\\\[\[, | |
48 syn match spyceEscBeginA ,\\<%, | |
49 syn cluster spyceEscBegin contains=spyceEscBeginS,spyceEscBeginA | |
50 syn match spyceEscEndS ,\\\]\], | |
51 syn match spyceEscEndA ,\\%>, | |
52 syn cluster spyceEscEnd contains=spyceEscEndS,spyceEscEndA | |
53 syn match spyceEscEndCommentS ,--\\\]\], | |
54 syn match spyceEscEndCommentA ,--\\%>, | |
55 syn cluster spyceEscEndComment contains=spyceEscEndCommentS,spyceEscEndCommentA | |
56 | |
57 syn region spyceStmtS matchgroup=spyceStmtDelim start=,\[\[, end=,\]\], contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend | |
58 syn region spyceStmtA matchgroup=spyceStmtDelim start=,<%, end=,%>, contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend | |
59 syn region spyceChunkS matchgroup=spyceChunkDelim start=,\[\[\\, end=,\]\], contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend | |
60 syn region spyceChunkA matchgroup=spyceChunkDelim start=,<%\\, end=,%>, contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend | |
61 syn region spyceEvalS matchgroup=spyceEvalDelim start=,\[\[=, end=,\]\], contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend | |
62 syn region spyceEvalA matchgroup=spyceEvalDelim start=,<%=, end=,%>, contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend | |
63 syn region spyceDirectiveS matchgroup=spyceDelim start=,\[\[\., end=,\]\], contains=spyceBeginError,spyceDirectiveKeyword,spyceDirectiveArg,spyceDirectiveValue,spyceDirectiveString keepend | |
64 syn region spyceDirectiveA matchgroup=spyceDelim start=,<%@, end=,%>, contains=spyceBeginError,spyceDirectiveKeyword,spyceDirectiveArg,spyceDirectiveValue,spyceDirectiveString keepend | |
65 syn region spyceCommentS matchgroup=spyceCommentDelim start=,\[\[--, end=,--\]\], | |
66 syn region spyceCommentA matchgroup=spyceCommentDelim start=,<%--, end=,--%>, | |
67 syn region spyceLambdaS matchgroup=spyceLambdaDelim start=,\[\[spy!\?, end=,\]\], contains=@Html,@spyce extend | |
68 syn region spyceLambdaA matchgroup=spyceLambdaDelim start=,<%spy!\?, end=,%>, contains=@Html,@spyce extend | |
69 | |
70 syn cluster spyce contains=spyceStmtS,spyceStmtA,spyceChunkS,spyceChunkA,spyceEvalS,spyceEvalA,spyceCommentS,spyceCommentA,spyceDirectiveS,spyceDirectiveA | |
71 | |
72 syn cluster htmlPreproc contains=@spyce | |
73 | |
74 hi link spyceDirectiveKeyword Special | |
75 hi link spyceDirectiveArg Type | |
76 hi link spyceDirectiveString String | |
77 hi link spyceDirectiveValue String | |
78 | |
79 hi link spyceDelim Special | |
80 hi link spyceStmtDelim spyceDelim | |
81 hi link spyceChunkDelim spyceDelim | |
82 hi link spyceEvalDelim spyceDelim | |
83 hi link spyceLambdaDelim spyceDelim | |
84 hi link spyceCommentDelim Comment | |
85 | |
86 hi link spyceBeginErrorS Error | |
87 hi link spyceBeginErrorA Error | |
88 hi link spyceEndErrorS Error | |
89 hi link spyceEndErrorA Error | |
90 | |
91 hi link spyceStmtS spyce | |
92 hi link spyceStmtA spyce | |
93 hi link spyceChunkS spyce | |
94 hi link spyceChunkA spyce | |
95 hi link spyceEvalS spyce | |
96 hi link spyceEvalA spyce | |
97 hi link spyceDirectiveS spyce | |
98 hi link spyceDirectiveA spyce | |
99 hi link spyceCommentS Comment | |
100 hi link spyceCommentA Comment | |
101 hi link spyceLambdaS Normal | |
102 hi link spyceLambdaA Normal | |
103 | |
104 hi link spyce Statement | |
105 | |
106 let b:current_syntax = "spyce" | |
107 if main_syntax == 'spyce' | |
108 unlet main_syntax | |
109 endif | |
110 |