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