Mercurial > vim
annotate runtime/syntax/tt2.vim @ 29447:eb01d8edb0ae
Added tag v9.0.0065 for changeset ef4f17d97ad07474c703cf75bbf640b6f5df0794
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 24 Jul 2022 22:00:04 +0200 |
parents | d1fe80fb35e6 |
children |
rev | line source |
---|---|
29150 | 1 " Vim syntax file |
4681
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
2 " Language: TT2 (Perl Template Toolkit) |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
3 " Maintainer: vim-perl <vim-perl@googlegroups.com> |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
4 " Author: Moriki, Atsushi <4woods+vim@gmail.com> |
29150 | 5 " Homepage: https://github.com/vim-perl/vim-perl |
6 " Bugs/requests: https://github.com/vim-perl/vim-perl/issues | |
7 " License: Vim License (see :help license) | |
8 " Last Change: 2018 Mar 28 | |
4681
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
9 " |
12499 | 10 " Installation: |
11 " put tt2.vim and tt2html.vim in to your syntax directory. | |
4681
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
12 " |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
13 " add below in your filetype.vim. |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
14 " au BufNewFile,BufRead *.tt2 setf tt2 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
15 " or |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
16 " au BufNewFile,BufRead *.tt2 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
17 " \ if ( getline(1) . getline(2) . getline(3) =~ '<\chtml' | |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
18 " \ && getline(1) . getline(2) . getline(3) !~ '<[%?]' ) | |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
19 " \ || getline(1) =~ '<!DOCTYPE HTML' | |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
20 " \ setf tt2html | |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
21 " \ else | |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
22 " \ setf tt2 | |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
23 " \ endif |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
24 " |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
25 " define START_TAG, END_TAG |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
26 " "ASP" |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
27 " :let b:tt2_syn_tags = '<% %>' |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
28 " "PHP" |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
29 " :let b:tt2_syn_tags = '<? ?>' |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
30 " "TT2 and HTML" |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
31 " :let b:tt2_syn_tags = '\[% %] <!-- -->' |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
32 " |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
33 " Changes: |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
34 " 0.1.3 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
35 " Changed fileformat from 'dos' to 'unix' |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
36 " Deleted 'echo' that print obstructive message |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
37 " 0.1.2 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
38 " Added block comment syntax |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
39 " e.g. [%# COMMENT |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
40 " COMMENT TOO %] |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
41 " [%# IT'S SAFE %] HERE IS OUTSIDE OF TT2 DIRECTIVE |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
42 " [% # WRONG!! %] HERE STILL BE COMMENT |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
43 " 0.1.1 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
44 " Release |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
45 " 0.1.0 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
46 " Internal |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
47 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
48 if !exists("b:tt2_syn_tags") |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
49 let b:tt2_syn_tags = '\[% %]' |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
50 "let b:tt2_syn_tags = '\[% %] \[\* \*]' |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
51 endif |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
52 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
53 if !exists("b:tt2_syn_inc_perl") |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
54 let b:tt2_syn_inc_perl = 1 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
55 endif |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
56 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
57 if exists("b:current_syntax") |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
58 finish |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
59 endif |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
60 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
61 let s:cpo_save = &cpo |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
62 set cpo&vim |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
63 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
64 syn case match |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
65 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
66 syn cluster tt2_top_cluster contains=tt2_perlcode,tt2_tag_region |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
67 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
68 " TT2 TAG Region |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
69 if exists("b:tt2_syn_tags") |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
70 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
71 let s:str = b:tt2_syn_tags . ' ' |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
72 let s:str = substitute(s:str,'^ \+','','g') |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
73 let s:str = substitute(s:str,' \+',' ','g') |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
74 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
75 while stridx(s:str,' ') > 0 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
76 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
77 let s:st = strpart(s:str,0,stridx(s:str,' ')) |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
78 let s:str = substitute(s:str,'[^ ]* ','',"") |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
79 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
80 let s:ed = strpart(s:str,0,stridx(s:str,' ')) |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
81 let s:str = substitute(s:str,'[^ ]* ','',"") |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
82 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
83 exec 'syn region tt2_tag_region '. |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
84 \ 'matchgroup=tt2_tag '. |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
85 \ 'start=+\(' . s:st .'\)[-]\=+ '. |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
86 \ 'end=+[-]\=\(' . s:ed . '\)+ '. |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
87 \ 'contains=@tt2_statement_cluster keepend extend' |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
88 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
89 exec 'syn region tt2_commentblock_region '. |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
90 \ 'matchgroup=tt2_tag '. |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
91 \ 'start=+\(' . s:st .'\)[-]\=\(#\)\@=+ '. |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
92 \ 'end=+[-]\=\(' . s:ed . '\)+ '. |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
93 \ 'keepend extend' |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
94 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
95 "Include Perl syntax when 'PERL' 'RAWPERL' block |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
96 if b:tt2_syn_inc_perl |
29150 | 97 syn include @Perl syntax/perl.vim |
4681
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
98 exec 'syn region tt2_perlcode '. |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
99 \ 'start=+\(\(RAW\)\=PERL\s*[-]\=' . s:ed . '\(\n\)\=\)\@<=+ ' . |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
100 \ 'end=+' . s:st . '[-]\=\s*END+me=s-1 contains=@Perl keepend' |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
101 endif |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
102 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
103 "echo 'TAGS ' . s:st . ' ' . s:ed |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
104 unlet s:st |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
105 unlet s:ed |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
106 endwhile |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
107 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
108 else |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
109 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
110 syn region tt2_tag_region |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
111 \ matchgroup=tt2_tag |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
112 \ start=+\(\[%\)[-]\=+ |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
113 \ end=+[-]\=%\]+ |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
114 \ contains=@tt2_statement_cluster keepend extend |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
115 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
116 syn region tt2_commentblock_region |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
117 \ matchgroup=tt2_tag |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
118 \ start=+\(\[%\)[-]\=#+ |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
119 \ end=+[-]\=%\]+ |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
120 \ keepend extend |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
121 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
122 "Include Perl syntax when 'PERL' 'RAWPERL' block |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
123 if b:tt2_syn_inc_perl |
29150 | 124 syn include @Perl syntax/perl.vim |
4681
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
125 syn region tt2_perlcode |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
126 \ start=+\(\(RAW\)\=PERL\s*[-]\=%]\(\n\)\=\)\@<=+ |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
127 \ end=+\[%[-]\=\s*END+me=s-1 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
128 \ contains=@Perl keepend |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
129 endif |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
130 endif |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
131 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
132 " Directive |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
133 syn keyword tt2_directive contained |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
134 \ GET CALL SET DEFAULT DEBUG |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
135 \ LAST NEXT BREAK STOP BLOCK |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
136 \ IF IN UNLESS ELSIF FOR FOREACH WHILE SWITCH CASE |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
137 \ USE PLUGIN MACRO META |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
138 \ TRY FINAL RETURN LAST |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
139 \ CLEAR TO STEP AND OR NOT MOD DIV |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
140 \ ELSE PERL RAWPERL END |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
141 syn match tt2_directive +|+ contained |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
142 syn keyword tt2_directive contained nextgroup=tt2_string_q,tt2_string_qq,tt2_blockname skipwhite skipempty |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
143 \ INSERT INCLUDE PROCESS WRAPPER FILTER |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
144 \ THROW CATCH |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
145 syn keyword tt2_directive contained nextgroup=tt2_def_tag skipwhite skipempty |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
146 \ TAGS |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
147 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
148 syn match tt2_def_tag "\S\+\s\+\S\+\|\<\w\+\>" contained |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
149 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
150 syn match tt2_variable +\I\w*+ contained |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
151 syn match tt2_operator "[+*/%:?-]" contained |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
152 syn match tt2_operator "\<\(mod\|div\|or\|and\|not\)\>" contained |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
153 syn match tt2_operator "[!=<>]=\=\|&&\|||" contained |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
154 syn match tt2_operator "\(\s\)\@<=_\(\s\)\@=" contained |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
155 syn match tt2_operator "=>\|," contained |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
156 syn match tt2_deref "\([[:alnum:]_)\]}]\s*\)\@<=\." contained |
29150 | 157 syn match tt2_comment +#.*$+ contained |
4681
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
158 syn match tt2_func +\<\I\w*\(\s*(\)\@=+ contained nextgroup=tt2_bracket_r skipempty skipwhite |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
159 " |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
160 syn region tt2_bracket_r start=+(+ end=+)+ contained contains=@tt2_statement_cluster keepend extend |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
161 syn region tt2_bracket_b start=+\[+ end=+]+ contained contains=@tt2_statement_cluster keepend extend |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
162 syn region tt2_bracket_b start=+{+ end=+}+ contained contains=@tt2_statement_cluster keepend extend |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
163 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
164 syn region tt2_string_qq start=+"+ end=+"+ skip=+\\"+ contained contains=tt2_ivariable keepend extend |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
165 syn region tt2_string_q start=+'+ end=+'+ skip=+\\'+ contained keepend extend |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
166 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
167 syn match tt2_ivariable +\$\I\w*\>\(\.\I\w*\>\)*+ contained |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
168 syn match tt2_ivariable +\${\I\w*\>\(\.\I\w*\>\)*}+ contained |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
169 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
170 syn match tt2_number "\d\+" contained |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
171 syn match tt2_number "\d\+\.\d\+" contained |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
172 syn match tt2_number "0x\x\+" contained |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
173 syn match tt2_number "0\o\+" contained |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
174 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
175 syn match tt2_blockname "\f\+" contained nextgroup=tt2_blockname_joint skipwhite skipempty |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
176 syn match tt2_blockname "$\w\+" contained contains=tt2_ivariable nextgroup=tt2_blockname_joint skipwhite skipempty |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
177 syn region tt2_blockname start=+"+ end=+"+ skip=+\\"+ contained contains=tt2_ivariable nextgroup=tt2_blockname_joint keepend skipwhite skipempty |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
178 syn region tt2_blockname start=+'+ end=+'+ skip=+\\'+ contained nextgroup=tt2_blockname_joint keepend skipwhite skipempty |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
179 syn match tt2_blockname_joint "+" contained nextgroup=tt2_blockname skipwhite skipempty |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
180 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
181 syn cluster tt2_statement_cluster contains=tt2_directive,tt2_variable,tt2_operator,tt2_string_q,tt2_string_qq,tt2_deref,tt2_comment,tt2_func,tt2_bracket_b,tt2_bracket_r,tt2_number |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
182 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
183 " Synchronizing |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
184 syn sync minlines=50 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
185 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
186 hi def link tt2_tag Type |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
187 hi def link tt2_tag_region Type |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
188 hi def link tt2_commentblock_region Comment |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
189 hi def link tt2_directive Statement |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
190 hi def link tt2_variable Identifier |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
191 hi def link tt2_ivariable Identifier |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
192 hi def link tt2_operator Statement |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
193 hi def link tt2_string_qq String |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
194 hi def link tt2_string_q String |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
195 hi def link tt2_blockname String |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
196 hi def link tt2_comment Comment |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
197 hi def link tt2_func Function |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
198 hi def link tt2_number Number |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
199 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
200 if exists("b:tt2_syn_tags") |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
201 unlet b:tt2_syn_tags |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
202 endif |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
203 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
204 let b:current_syntax = "tt2" |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
205 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
206 let &cpo = s:cpo_save |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
207 unlet s:cpo_save |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
208 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
209 " vim:ts=4:sw=4 |