annotate runtime/syntax/perl.vim @ 4182:f4960ddda07c v7.3.843

updated for version 7.3.843 Problem: Missing test file changes. Solution: Change the tests.
author Bram Moolenaar <bram@vim.org>
date Tue, 26 Feb 2013 22:54:11 +0100
parents 0bb74f626ba7
children 2eb30f341e8d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
2 " Language: Perl 5
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
3 " Maintainer: Andy Lester <andy@petdance.com>
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
4 " URL: http://github.com/petdance/vim-perl/tree/master
2548
0bb74f626ba7 Update to Perl runtime files. (Andy Lester)
Bram Moolenaar <bram@vim.org>
parents: 2531
diff changeset
5 " Last Change: 2010-08-10
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
6 " Contributors: Andy Lester <andy@petdance.com>
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
7 " Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
8 " Lukas Mai <l.mai.web.de>
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
9 " Nick Hibma <nick@van-laarhoven.org>
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
10 " Sonia Heimann <niania@netsurf.org>
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
11 " and many others.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 " Please download most recent version first before mailing
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 " any comments.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 " The following parameters are available for tuning the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 " perl syntax highlighting, with defaults given:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 " unlet perl_include_pod
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
20 " unlet perl_no_scope_in_variables
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
21 " unlet perl_no_extended_vars
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 " unlet perl_string_as_statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 " unlet perl_no_sync_on_sub
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 " unlet perl_no_sync_on_global_var
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 " let perl_sync_dist = 100
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 " unlet perl_fold
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 " unlet perl_fold_blocks
1118
2b8ff9e3c520 updated for version 7.1a
vimboss
parents: 557
diff changeset
28 " let perl_nofold_packages = 1
2b8ff9e3c520 updated for version 7.1a
vimboss
parents: 557
diff changeset
29 " let perl_nofold_subs = 1
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30
2548
0bb74f626ba7 Update to Perl runtime files. (Andy Lester)
Bram Moolenaar <bram@vim.org>
parents: 2531
diff changeset
31 if exists("b:current_syntax")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 " POD starts with ^=<word> and ends with ^=cut
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 if exists("perl_include_pod")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 " Include a while extra syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn include @Pod syntax/pod.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 unlet b:current_syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 if exists("perl_fold")
557
862863033fdd updated for version 7.0158
vimboss
parents: 548
diff changeset
43 syn region perlPOD start="^=[a-z]" end="^=cut" contains=@Pod,@Spell,perlTodo keepend fold
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn region perlPOD start="^=cut" end="^=cut" contains=perlTodo keepend fold
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 else
557
862863033fdd updated for version 7.0158
vimboss
parents: 548
diff changeset
46 syn region perlPOD start="^=[a-z]" end="^=cut" contains=@Pod,@Spell,perlTodo keepend
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn region perlPOD start="^=cut" end="^=cut" contains=perlTodo keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 " Use only the bare minimum of rules
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 if exists("perl_fold")
1118
2b8ff9e3c520 updated for version 7.1a
vimboss
parents: 557
diff changeset
52 syn region perlPOD start="^=[a-z]" end="^=cut" fold
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 else
1118
2b8ff9e3c520 updated for version 7.1a
vimboss
parents: 557
diff changeset
54 syn region perlPOD start="^=[a-z]" end="^=cut"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
59 syn cluster perlTop contains=TOP
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
60 syn region perlGenericBlock matchgroup=perlGenericBlock start="{" end="}" contained transparent
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
61
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
62
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 " All keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 "
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
65 syn match perlConditional "\<\%(if\|elsif\|unless\|given\|when\|default\)\>"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
66 syn match perlConditional "\<else\>" nextgroup=perlElseIfError skipwhite skipnl skipempty
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
67 syn match perlRepeat "\<\%(while\|for\%(each\)\=\|do\|until\|continue\)\>"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
68 syn match perlOperator "\<\%(defined\|undef\|eq\|ne\|[gl][et]\|cmp\|not\|and\|or\|xor\|not\|bless\|ref\|do\)\>"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
69 syn match perlControl "\<\%(BEGIN\|CHECK\|INIT\|END\|UNITCHECK\)\>"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
71 syn match perlStatementStorage "\<\%(my\|our\|local\|state\)\>"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
72 syn match perlStatementControl "\<\%(return\|last\|next\|redo\|goto\|break\)\>"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
73 syn match perlStatementScalar "\<\%(chom\=p\|chr\|crypt\|r\=index\|lc\%(first\)\=\|length\|ord\|pack\|sprintf\|substr\|uc\%(first\)\=\)\>"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
74 syn match perlStatementRegexp "\<\%(pos\|quotemeta\|split\|study\)\>"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
75 syn match perlStatementNumeric "\<\%(abs\|atan2\|cos\|exp\|hex\|int\|log\|oct\|rand\|sin\|sqrt\|srand\)\>"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
76 syn match perlStatementList "\<\%(splice\|unshift\|shift\|push\|pop\|join\|reverse\|grep\|map\|sort\|unpack\)\>"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
77 syn match perlStatementHash "\<\%(delete\|each\|exists\|keys\|values\)\>"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
78 syn match perlStatementIOfunc "\<\%(syscall\|dbmopen\|dbmclose\)\>"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
79 syn match perlStatementFiledesc "\<\%(binmode\|close\%(dir\)\=\|eof\|fileno\|getc\|lstat\|printf\=\|read\%(dir\|line\|pipe\)\|rewinddir\|say\|select\|stat\|tell\%(dir\)\=\|write\)\>" nextgroup=perlFiledescStatementNocomma skipwhite
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
80 syn match perlStatementFiledesc "\<\%(fcntl\|flock\|ioctl\|open\%(dir\)\=\|read\|seek\%(dir\)\=\|sys\%(open\|read\|seek\|write\)\|truncate\)\>" nextgroup=perlFiledescStatementComma skipwhite
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
81 syn match perlStatementVector "\<vec\>"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
82 syn match perlStatementFiles "\<\%(ch\%(dir\|mod\|own\|root\)\|glob\|link\|mkdir\|readlink\|rename\|rmdir\|symlink\|umask\|unlink\|utime\)\>"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
83 syn match perlStatementFiles "-[rwxoRWXOezsfdlpSbctugkTBMAC]\>"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
84 syn match perlStatementFlow "\<\%(caller\|die\|dump\|eval\|exit\|wantarray\)\>"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
85 syn match perlStatementInclude "\<require\>"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
86 syn match perlStatementInclude "\<\%(use\|no\)\s\+\%(\%(attributes\|attrs\|autouse\|parent\|base\|big\%(int\|num\|rat\)\|blib\|bytes\|charnames\|constant\|diagnostics\|encoding\%(::warnings\)\=\|feature\|fields\|filetest\|if\|integer\|less\|lib\|locale\|mro\|open\|ops\|overload\|re\|sigtrap\|sort\|strict\|subs\|threads\%(::shared\)\=\|utf8\|vars\|version\|vmsish\|warnings\%(::register\)\=\)\>\)\="
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
87 syn match perlStatementProc "\<\%(alarm\|exec\|fork\|get\%(pgrp\|ppid\|priority\)\|kill\|pipe\|set\%(pgrp\|priority\)\|sleep\|system\|times\|wait\%(pid\)\=\)\>"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
88 syn match perlStatementSocket "\<\%(acept\|bind\|connect\|get\%(peername\|sock\%(name\|opt\)\)\|listen\|recv\|send\|setsockopt\|shutdown\|socket\%(pair\)\=\)\>"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
89 syn match perlStatementIPC "\<\%(msg\%(ctl\|get\|rcv\|snd\)\|sem\%(ctl\|get\|op\)\|shm\%(ctl\|get\|read\|write\)\)\>"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
90 syn match perlStatementNetwork "\<\%(\%(end\|[gs]et\)\%(host\|net\|proto\|serv\)ent\|get\%(\%(host\|net\)by\%(addr\|name\)\|protoby\%(name\|number\)\|servby\%(name\|port\)\)\)\>"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
91 syn match perlStatementPword "\<\%(get\%(pw\%(uid\|nam\)\|gr\%(gid\|nam\)\|login\)\)\|\%(end\|[gs]et\)\%(pw\|gr\)ent\>"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
92 syn match perlStatementTime "\<\%(gmtime\|localtime\|time\)\>"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
94 syn match perlStatementMisc "\<\%(warn\|formline\|reset\|scalar\|prototype\|lock\|tied\=\|untie\)\>"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
95
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
96 syn keyword perlTodo TODO TBD FIXME XXX NOTE contained
1118
2b8ff9e3c520 updated for version 7.1a
vimboss
parents: 557
diff changeset
97
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
98 syn region perlStatementIndirObjWrap matchgroup=perlStatementIndirObj start="\<\%(map\|grep\|sort\|print\|system\|exec\)\>\s*{" end="}" contains=@perlTop,perlGenericBlock
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
99
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
100 syn match perlLabel "^\s*\h\w*\s*::\@!\%(\<v\d\+\s*:\)\@<!"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 " Perl Identifiers.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 " Should be cleaned up to better handle identifiers in particular situations
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 " (in hash keys for example)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 " Plain identifiers: $foo, @foo, $#foo, %foo, &foo and dereferences $$foo, @$foo, etc.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 " We do not process complex things such as @{${"foo"}}. Too complicated, and
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 " too slow. And what is after the -> is *not* considered as part of the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 " variable - there again, too complicated and too slow.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 " Special variables first ($^A, ...) and ($|, $', ...)
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
113 syn match perlVarPlain "$^[ACDEFHILMNOPRSTVWX]\="
1118
2b8ff9e3c520 updated for version 7.1a
vimboss
parents: 557
diff changeset
114 syn match perlVarPlain "$[\\\"\[\]'&`+*.,;=%~!?@#$<>(-]"
2531
c9022997af9e Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
115 syn match perlVarPlain "%+"
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
116 syn match perlVarPlain "$\%(0\|[1-9]\d*\)"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 " Same as above, but avoids confusion in $::foo (equivalent to $main::foo)
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
118 syn match perlVarPlain "$::\@!"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 " These variables are not recognized within matches.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 syn match perlVarNotInMatches "$[|)]"
1118
2b8ff9e3c520 updated for version 7.1a
vimboss
parents: 557
diff changeset
121 " This variable is not recognized within matches delimited by m//.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 syn match perlVarSlash "$/"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 " And plain identifiers
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
125 syn match perlPackageRef "[$@#%*&]\%(\%(::\|'\)\=\I\i*\%(\%(::\|'\)\I\i*\)*\)\=\%(::\|'\)\I"ms=s+1,me=e-1 contained
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
127 " To not highlight packages in variables as a scope reference - i.e. in
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
128 " $pack::var, pack:: is a scope, just set "perl_no_scope_in_variables"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
129 " If you don't want complex things like @{${"foo"}} to be processed,
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
130 " just set the variable "perl_no_extended_vars"...
1118
2b8ff9e3c520 updated for version 7.1a
vimboss
parents: 557
diff changeset
131
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
132 if !exists("perl_no_scope_in_variables")
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
133 syn match perlVarPlain "\%([@$]\|\$#\)\$*\%(\I\i*\)\=\%(\%(::\|'\)\I\i*\)*\%(::\|\i\@<=\)" contains=perlPackageRef nextgroup=perlVarMember,perlVarSimpleMember,perlMethod
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
134 syn match perlVarPlain2 "%\$*\%(\I\i*\)\=\%(\%(::\|'\)\I\i*\)*\%(::\|\i\@<=\)" contains=perlPackageRef
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
135 syn match perlFunctionName "&\$*\%(\I\i*\)\=\%(\%(::\|'\)\I\i*\)*\%(::\|\i\@<=\)" contains=perlPackageRef nextgroup=perlVarMember,perlVarSimpleMember,perlMethod
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136 else
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
137 syn match perlVarPlain "\%([@$]\|\$#\)\$*\%(\I\i*\)\=\%(\%(::\|'\)\I\i*\)*\%(::\|\i\@<=\)" nextgroup=perlVarMember,perlVarSimpleMember,perlMethod
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
138 syn match perlVarPlain2 "%\$*\%(\I\i*\)\=\%(\%(::\|'\)\I\i*\)*\%(::\|\i\@<=\)"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
139 syn match perlFunctionName "&\$*\%(\I\i*\)\=\%(\%(::\|'\)\I\i*\)*\%(::\|\i\@<=\)" nextgroup=perlVarMember,perlVarSimpleMember,perlMethod
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
142 if !exists("perl_no_extended_vars")
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
143 syn cluster perlExpr contains=perlStatementIndirObjWrap,perlStatementScalar,perlStatementRegexp,perlStatementNumeric,perlStatementList,perlStatementHash,perlStatementFiles,perlStatementTime,perlStatementMisc,perlVarPlain,perlVarPlain2,perlVarNotInMatches,perlVarSlash,perlVarBlock,perlVarBlock2,perlShellCommand,perlFloat,perlNumber,perlStringUnexpanded,perlString,perlQQ,perlArrow,perlGenericBlock
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
144 syn region perlArrow matchgroup=perlArrow start="->\s*(" end=")" contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod contained
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
145 syn region perlArrow matchgroup=perlArrow start="->\s*\[" end="\]" contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod contained
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
146 syn region perlArrow matchgroup=perlArrow start="->\s*{" end="}" contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod contained
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
147 syn match perlArrow "->\s*{\s*\I\i*\s*}" contains=perlVarSimpleMemberName nextgroup=perlVarMember,perlVarSimpleMember,perlMethod contained
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
148 syn region perlArrow matchgroup=perlArrow start="->\s*\$*\I\i*\s*(" end=")" contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod contained
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
149 syn region perlVarBlock matchgroup=perlVarPlain start="\%($#\|[$@]\)\$*{" skip="\\}" end="}" contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
150 syn region perlVarBlock2 matchgroup=perlVarPlain start="[%&*]\$*{" skip="\\}" end="}" contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
151 syn match perlVarPlain2 "[%&*]\$*{\I\i*}" nextgroup=perlVarMember,perlVarSimpleMember,perlMethod
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
152 syn match perlVarPlain "\%(\$#\|[@$]\)\$*{\I\i*}" nextgroup=perlVarMember,perlVarSimpleMember,perlMethod
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
153 syn region perlVarMember matchgroup=perlVarPlain start="\%(->\)\={" skip="\\}" end="}" contained contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
154 syn match perlVarSimpleMember "\%(->\)\={\s*\I\i*\s*}" nextgroup=perlVarMember,perlVarSimpleMember,perlMethod contains=perlVarSimpleMemberName contained
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
155 syn match perlVarSimpleMemberName "\I\i*" contained
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
156 syn region perlVarMember matchgroup=perlVarPlain start="\%(->\)\=\[" skip="\\]" end="]" contained contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
157 syn match perlPackageConst "__PACKAGE__" nextgroup=perlMethod
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
158 syn match perlMethod "->\$*\I\i*" contained nextgroup=perlVarSimpleMember,perlVarMember,perlMethod
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
159 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
160
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
161 " File Descriptors
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
162 syn match perlFiledescRead "<\h\w*>"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
163
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
164 syn match perlFiledescStatementComma "(\=\s*\u\w*\s*,"me=e-1 transparent contained contains=perlFiledescStatement
1118
2b8ff9e3c520 updated for version 7.1a
vimboss
parents: 557
diff changeset
165 syn match perlFiledescStatementNocomma "(\=\s*\u\w*\s*[^, \t]"me=e-1 transparent contained contains=perlFiledescStatement
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
166
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
167 syn match perlFiledescStatement "\u\w*" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
168
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
169 " Special characters in strings and matches
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
170 syn match perlSpecialString "\\\%(\o\{1,3}\|x\%({\x\+}\|\x\{1,2}\)\|c.\|[^cx]\)" contained extend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
171 syn match perlSpecialStringU2 "\\." extend contained transparent contains=NONE
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
172 syn match perlSpecialStringU "\\\\" contained
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
173 syn match perlSpecialMatch "\\[1-9]" contained extend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
174 syn match perlSpecialMatch "\\g\%(\d\+\|{\%(-\=\d\+\|\h\w*\)}\)" contained
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
175 syn match perlSpecialMatch "\\k\%(<\h\w*>\|'\h\w*'\)" contained
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
176 syn match perlSpecialMatch "{\d\+\%(,\%(\d\+\)\=\)\=}" contained
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
177 syn match perlSpecialMatch "\[[]-]\=[^\[\]]*[]-]\=\]" contained
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
178 syn match perlSpecialMatch "[+*()?.]" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
179 syn match perlSpecialMatch "(?[#:=!]" contained
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
180 syn match perlSpecialMatch "(?[impsx]*\%(-[imsx]\+\)\=)" contained
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
181 syn match perlSpecialMatch "(?\%([-+]\=\d\+\|R\))" contained
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
182 syn match perlSpecialMatch "(?\%(&\|P[>=]\)\h\w*)" contained
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
183 syn match perlSpecialMatch "(\*\%(\%(PRUNE\|SKIP\|THEN\)\%(:[^)]*\)\=\|\%(MARK\|\):[^)]*\|COMMIT\|F\%(AIL\)\=\|ACCEPT\))" contained
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
184
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
185 " Possible errors
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
186 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
187 " Highlight lines with only whitespace (only in blank delimited here documents) as errors
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
188 syn match perlNotEmptyLine "^\s\+$" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
189 " Highlight '} else if (...) {', it should be '} else { if (...) { ' or
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
190 " '} elsif (...) {'.
2531
c9022997af9e Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
191 syn match perlElseIfError "\s\+if" contained
c9022997af9e Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
192 syn keyword perlElseIfError elseif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
193
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
194 " Variable interpolation
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
195 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
196 " These items are interpolated inside "" strings and similar constructs.
1118
2b8ff9e3c520 updated for version 7.1a
vimboss
parents: 557
diff changeset
197 syn cluster perlInterpDQ contains=perlSpecialString,perlVarPlain,perlVarNotInMatches,perlVarSlash,perlVarBlock
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
198 " These items are interpolated inside '' strings and similar constructs.
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
199 syn cluster perlInterpSQ contains=perlSpecialStringU,perlSpecialStringU2
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
200 " These items are interpolated inside m// matches and s/// substitutions.
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
201 syn cluster perlInterpSlash contains=perlSpecialString,perlSpecialMatch,perlVarPlain,perlVarBlock
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
202 " These items are interpolated inside m## matches and s### substitutions.
1118
2b8ff9e3c520 updated for version 7.1a
vimboss
parents: 557
diff changeset
203 syn cluster perlInterpMatch contains=@perlInterpSlash,perlVarSlash
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
204
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
205 " Shell commands
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
206 syn region perlShellCommand matchgroup=perlMatchStartEnd start="`" end="`" contains=@perlInterpDQ keepend
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
207
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
208 " Constants
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
209 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
210 " Numbers
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
211 syn match perlNumber "\<\%(0\%(x\x[[:xdigit:]_]*\|b[01][01_]*\|\o[0-7_]*\|\)\|[1-9][[:digit:]_]*\)\>"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
212 syn match perlFloat "\<\d[[:digit:]_]*[eE][\-+]\=\d\+"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
213 syn match perlFloat "\<\d[[:digit:]_]*\.[[:digit:]_]*\%([eE][\-+]\=\d\+\)\="
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
214 syn match perlFloat "\.[[:digit:]_]\+\%([eE][\-+]\=\d\+\)\="
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
215
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
216 syn match perlString "\<\%(v\d\+\%(\.\d\+\)*\|\d\+\%(\.\d\+\)\{2,}\)\>" contains=perlVStringV
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
217 syn match perlVStringV "\<v" contained
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
218
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
219
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
220 syn region perlParensSQ start=+(+ end=+)+ extend contained transparent contains=perlParensSQ,@perlInterpSQ keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
221 syn region perlBracketsSQ start=+\[+ end=+\]+ extend contained transparent contains=perlBracketsSQ,@perlInterpSQ keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
222 syn region perlBracesSQ start=+{+ end=+}+ extend contained transparent contains=perlBracesSQ,@perlInterpSQ keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
223 syn region perlAnglesSQ start=+<+ end=+>+ extend contained transparent contains=perlAnglesSQ,@perlInterpSQ keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
224
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
225 syn region perlParensDQ start=+(+ end=+)+ extend contained transparent contains=perlParensDQ,@perlInterpDQ keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
226 syn region perlBracketsDQ start=+\[+ end=+\]+ extend contained transparent contains=perlBracketsDQ,@perlInterpDQ keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
227 syn region perlBracesDQ start=+{+ end=+}+ extend contained transparent contains=perlBracesDQ,@perlInterpDQ keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
228 syn region perlAnglesDQ start=+<+ end=+>+ extend contained transparent contains=perlAnglesDQ,@perlInterpDQ keepend
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
229
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
230
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
231 " Simple version of searches and matches
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
232 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\>\s*\z([^[:space:]'([{<#]\)+ end=+\z1[cgimopsx]*+ contains=@perlInterpMatch keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
233 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m#+ end=+#[cgimopsx]*+ contains=@perlInterpMatch keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
234 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*'+ end=+'[cgimopsx]*+ contains=@perlInterpSQ keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
235 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*/+ end=+/[cgimopsx]*+ contains=@perlInterpSlash keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
236 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*(+ end=+)[cgimopsx]*+ contains=@perlInterpMatch,perlParensDQ keepend
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
237
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
238 " A special case for m{}, m<> and m[] which allows for comments and extra whitespace in the pattern
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
239 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*{+ end=+}[cgimopsx]*+ contains=@perlInterpMatch,perlComment,perlBracesDQ keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
240 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*<+ end=+>[cgimopsx]*+ contains=@perlInterpMatch,perlAnglesDQ keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
241 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*\[+ end=+\][cgimopsx]*+ contains=@perlInterpMatch,perlComment,perlBracketsDQ keepend
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
242
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
243 " Below some hacks to recognise the // variant. This is virtually impossible to catch in all
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
244 " cases as the / is used in so many other ways, but these should be the most obvious ones.
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
245 syn region perlMatch matchgroup=perlMatchStartEnd start="\%([$@%&*]\@<!\%(\<split\|\<while\|\<if\|\<unless\|\.\.\|[-+*!~(\[{=]\)\s*\)\@<=/\%(/=\)\@!" start=+^/\%(/=\)\@!+ start=+\s\@<=/\%(/=\)\@![^[:space:][:digit:]$@%=]\@=\%(/\_s*\%([([{$@%&*[:digit:]"'`]\|\_s\w\|[[:upper:]_abd-fhjklnqrt-wyz]\)\)\@!+ skip=+\\/+ end=+/[cgimopsx]*+ contains=@perlInterpSlash
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
246
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
247
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
248 " Substitutions
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
249 " perlMatch is the first part, perlSubstitution* is the substitution part
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
250 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!s\>\s*\z([^[:space:]'([{<#]\)+ end=+\z1+me=e-1 contains=@perlInterpMatch nextgroup=perlSubstitutionGQQ keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
251 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!s\s*'+ end=+'+me=e-1 contains=@perlInterpSQ nextgroup=perlSubstitutionSQ keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
252 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!s\s*/+ end=+/+me=e-1 contains=@perlInterpSlash nextgroup=perlSubstitutionGQQ keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
253 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!s#+ end=+#+me=e-1 contains=@perlInterpMatch nextgroup=perlSubstitutionGQQ keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
254 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!s\s*(+ end=+)+ contains=@perlInterpMatch,perlParensDQ nextgroup=perlSubstitutionGQQ skipwhite skipempty skipnl keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
255 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!s\s*<+ end=+>+ contains=@perlInterpMatch,perlAnglesDQ nextgroup=perlSubstitutionGQQ skipwhite skipempty skipnl keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
256 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!s\s*\[+ end=+\]+ contains=@perlInterpMatch,perlBracketsDQ nextgroup=perlSubstitutionGQQ skipwhite skipempty skipnl keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
257 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!s\s*{+ end=+}+ contains=@perlInterpMatch,perlBracesDQ nextgroup=perlSubstitutionGQQ skipwhite skipempty skipnl keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
258 syn region perlSubstitutionGQQ matchgroup=perlMatchStartEnd start=+\z([^[:space:]'([{<]\)+ end=+\z1[ecgimopsx]*+ keepend contained contains=@perlInterpDQ
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
259 syn region perlSubstitutionGQQ matchgroup=perlMatchStartEnd start=+(+ end=+)[ecgimopsx]*+ contained contains=@perlInterpDQ,perlParensDQ keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
260 syn region perlSubstitutionGQQ matchgroup=perlMatchStartEnd start=+\[+ end=+\][ecgimopsx]*+ contained contains=@perlInterpDQ,perlBracketsDQ keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
261 syn region perlSubstitutionGQQ matchgroup=perlMatchStartEnd start=+{+ end=+}[ecgimopsx]*+ contained contains=@perlInterpDQ,perlBracesDQ keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
262 syn region perlSubstitutionGQQ matchgroup=perlMatchStartEnd start=+<+ end=+>[ecgimopsx]*+ contained contains=@perlInterpDQ,perlAnglesDQ keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
263 syn region perlSubstitutionSQ matchgroup=perlMatchStartEnd start=+'+ end=+'[ecgimopsx]*+ contained contains=@perlInterpSQ keepend
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
264
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
265 " Translations
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
266 " perlMatch is the first part, perlTranslation* is the second, translator part.
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
267 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!\%(tr\|y\)\>\s*\z([^[:space:]([{<#]\)+ end=+\z1+me=e-1 contains=@perlInterpSQ nextgroup=perlTranslationGQ
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
268 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!\%(tr\|y\)#+ end=+#+me=e-1 contains=@perlInterpSQ nextgroup=perlTranslationGQ
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
269 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!\%(tr\|y\)\s*\[+ end=+\]+ contains=@perlInterpSQ,perlBracketsSQ nextgroup=perlTranslationGQ skipwhite skipempty skipnl
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
270 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!\%(tr\|y\)\s*(+ end=+)+ contains=@perlInterpSQ,perlParensSQ nextgroup=perlTranslationGQ skipwhite skipempty skipnl
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
271 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!\%(tr\|y\)\s*<+ end=+>+ contains=@perlInterpSQ,perlAnglesSQ nextgroup=perlTranslationGQ skipwhite skipempty skipnl
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
272 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!\%(tr\|y\)\s*{+ end=+}+ contains=@perlInterpSQ,perlBracesSQ nextgroup=perlTranslationGQ skipwhite skipempty skipnl
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
273 syn region perlTranslationGQ matchgroup=perlMatchStartEnd start=+\z([^[:space:]([{<]\)+ end=+\z1[cds]*+ contained
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
274 syn region perlTranslationGQ matchgroup=perlMatchStartEnd start=+(+ end=+)[cds]*+ contains=perlParensSQ contained
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
275 syn region perlTranslationGQ matchgroup=perlMatchStartEnd start=+\[+ end=+\][cds]*+ contains=perlBracketsSQ contained
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
276 syn region perlTranslationGQ matchgroup=perlMatchStartEnd start=+{+ end=+}[cds]*+ contains=perlBracesSQ contained
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
277 syn region perlTranslationGQ matchgroup=perlMatchStartEnd start=+<+ end=+>[cds]*+ contains=perlAnglesSQ contained
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
278
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
279
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
280 " Strings and q, qq, qw and qr expressions
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
281
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
282 syn region perlStringUnexpanded matchgroup=perlStringStartEnd start="'" end="'" contains=@perlInterpSQ keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
283 syn region perlString matchgroup=perlStringStartEnd start=+"+ end=+"+ contains=@perlInterpDQ keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
284 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q\>\s*\z([^[:space:]#([{<]\)+ end=+\z1+ contains=@perlInterpSQ keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
285 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q#+ end=+#+ contains=@perlInterpSQ keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
286 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q\s*(+ end=+)+ contains=@perlInterpSQ,perlParensSQ keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
287 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q\s*\[+ end=+\]+ contains=@perlInterpSQ,perlBracketsSQ keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
288 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q\s*{+ end=+}+ contains=@perlInterpSQ,perlBracesSQ keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
289 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q\s*<+ end=+>+ contains=@perlInterpSQ,perlAnglesSQ keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
290
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
291 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q[qx]\>\s*\z([^[:space:]#([{<]\)+ end=+\z1+ contains=@perlInterpDQ keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
292 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q[qx]#+ end=+#+ contains=@perlInterpDQ keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
293 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q[qx]\s*(+ end=+)+ contains=@perlInterpDQ,perlParensDQ keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
294 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q[qx]\s*\[+ end=+\]+ contains=@perlInterpDQ,perlBracketsDQ keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
295 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q[qx]\s*{+ end=+}+ contains=@perlInterpDQ,perlBracesDQ keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
296 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q[qx]\s*<+ end=+>+ contains=@perlInterpDQ,perlAnglesDQ keepend
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
297
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
298 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qw\s*\z([^[:space:]#([{<]\)+ end=+\z1+ contains=@perlInterpSQ keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
299 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qw#+ end=+#+ contains=@perlInterpSQ keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
300 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qw\s*(+ end=+)+ contains=@perlInterpSQ,perlParensSQ keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
301 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qw\s*\[+ end=+\]+ contains=@perlInterpSQ,perlBracketsSQ keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
302 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qw\s*{+ end=+}+ contains=@perlInterpSQ,perlBracesSQ keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
303 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qw\s*<+ end=+>+ contains=@perlInterpSQ,perlAnglesSQ keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
304
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
305 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\>\s*\z([^[:space:]#([{<'/]\)+ end=+\z1[imosx]*+ contains=@perlInterpMatch keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
306 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\s*/+ end=+/[imosx]*+ contains=@perlInterpSlash keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
307 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr#+ end=+#[imosx]*+ contains=@perlInterpMatch keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
308 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\s*'+ end=+'[imosx]*+ contains=@perlInterpSQ keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
309 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\s*(+ end=+)[imosx]*+ contains=@perlInterpMatch,perlParensDQ keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
310
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
311 " A special case for qr{}, qr<> and qr[] which allows for comments and extra whitespace in the pattern
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
312 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\s*{+ end=+}[imosx]*+ contains=@perlInterpMatch,perlBracesDQ,perlComment keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
313 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\s*<+ end=+>[imosx]*+ contains=@perlInterpMatch,perlAnglesDQ,perlComment keepend
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
314 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\s*\[+ end=+\][imosx]*+ contains=@perlInterpMatch,perlBracketsDQ,perlComment keepend
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
315
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
316 " Constructs such as print <<EOF [...] EOF, 'here' documents
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
317 "
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
318 " XXX Any statements after the identifier are in perlString colour (i.e.
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
319 " 'if $a' in 'print <<EOF if $a'). This is almost impossible to get right it
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
320 " seems due to the 'auto-extending nature' of regions.
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
321 if exists("perl_fold")
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
322 syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\z(\I\i*\).*+ end=+^\z1$+ contains=@perlInterpDQ fold
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
323 syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*"\z([^\\"]*\%(\\.[^\\"]*\)*\)"+ end=+^\z1$+ contains=@perlInterpDQ fold
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
324 syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*'\z([^\\']*\%(\\.[^\\']*\)*\)'+ end=+^\z1$+ contains=@perlInterpSQ fold
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
325 syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*""+ end=+^$+ contains=@perlInterpDQ,perlNotEmptyLine fold
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
326 syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*''+ end=+^$+ contains=@perlInterpSQ,perlNotEmptyLine fold
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
327 syn region perlAutoload matchgroup=perlStringStartEnd start=+<<\s*\(['"]\=\)\z(END_\%(SUB\|OF_FUNC\|OF_AUTOLOAD\)\)\1+ end=+^\z1$+ contains=ALL fold
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
328 else
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
329 syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\z(\I\i*\)+ end=+^\z1$+ contains=@perlInterpDQ
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
330 syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*"\z([^\\"]*\%(\\.[^\\"]*\)*\)"+ end=+^\z1$+ contains=@perlInterpDQ
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
331 syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*'\z([^\\']*\%(\\.[^\\']*\)*\)'+ end=+^\z1$+ contains=@perlInterpSQ
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
332 syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*""+ end=+^$+ contains=@perlInterpDQ,perlNotEmptyLine
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
333 syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*''+ end=+^$+ contains=@perlInterpSQ,perlNotEmptyLine
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
334 syn region perlAutoload matchgroup=perlStringStartEnd start=+<<\s*\(['"]\=\)\z(END_\%(SUB\|OF_FUNC\|OF_AUTOLOAD\)\)\1+ end=+^\z1$+ contains=ALL
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
335 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
336
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
337
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
338 " Class declarations
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
339 "
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
340 syn match perlPackageDecl "\<package\s\+\%(\h\|::\)\%(\w\|::\)*" contains=perlStatementPackage
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
341 syn keyword perlStatementPackage package contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
342
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
343 " Functions
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
344 " sub [name] [(prototype)] {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
345 "
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
346 syn match perlSubError "[^[:space:];{#]" contained
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
347 if v:version == 701 && !has('patch221') " XXX I hope that's the right one
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
348 syn match perlSubAttributes ":" contained
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
349 else
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
350 syn match perlSubAttributesCont "\h\w*\_s*\%(:\_s*\)\=" nextgroup=@perlSubAttrMaybe contained
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
351 syn region perlSubAttributesCont matchgroup=perlSubAttributesCont start="\h\w*(" end=")\_s*\%(:\_s*\)\=" nextgroup=@perlSubAttrMaybe contained contains=@perlInterpSQ,perlParensSQ
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
352 syn cluster perlSubAttrMaybe contains=perlSubAttributesCont,perlSubError
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
353 syn match perlSubAttributes "" contained nextgroup=perlSubError
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
354 syn match perlSubAttributes ":\_s*" contained nextgroup=@perlSubAttrMaybe
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
355 endif
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
356 syn match perlSubPrototypeError "(\%(\_s*\%(\%(\\\%([$@%&*]\|\[[$@%&*]\+\]\)\|[$&*]\|[@%]\%(\_s*)\)\@=\|;\%(\_s*[)$@%&*\\]\)\@=\|_\%(\_s*[);]\)\@=\)\_s*\)*\)\@>\zs\_[^)]\+" contained
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
357 syn match perlSubPrototype +(\_[^)]*)\_s*\|+ nextgroup=perlSubAttributes contained contains=perlSubPrototypeError
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
358 syn match perlSubName +\%(\h\|::\|'\w\)\%(\w\|::\|'\w\)*\_s*\|+ contained nextgroup=perlSubPrototype
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
359
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
360 syn match perlFunction +\<sub\>\_s*+ nextgroup=perlSubName
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
361
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
362 if !exists("perl_no_scope_in_variables")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
363 syn match perlFunctionPRef "\h\w*::" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
364 syn match perlFunctionName "\h\w*[^:]" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
365 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
366 syn match perlFunctionName "\h[[:alnum:]_:]*" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
367 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
368
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
369 " The => operator forces a bareword to the left of it to be interpreted as
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
370 " a string
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
371 syn match perlString "\I\@<!-\?\I\i*\%(\s*=>\)\@="
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
372
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
373 " All other # are comments, except ^#!
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
374 syn match perlComment "#.*" contains=perlTodo,@Spell
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
375 syn match perlSharpBang "^#!.*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
376
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
377 " Formats
1118
2b8ff9e3c520 updated for version 7.1a
vimboss
parents: 557
diff changeset
378 syn region perlFormat matchgroup=perlStatementIOFunc start="^\s*\<format\s\+\k\+\s*=\s*$"rs=s+6 end="^\s*\.\s*$" contains=perlFormatName,perlFormatField,perlVarPlain,perlVarPlain2
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
379 syn match perlFormatName "format\s\+\k\+\s*="lc=7,me=e-1 contained
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
380 syn match perlFormatField "[@^][|<>~]\+\%(\.\.\.\)\=" contained
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
381 syn match perlFormatField "[@^]#[#.]*" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
382 syn match perlFormatField "@\*" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
383 syn match perlFormatField "@[^A-Za-z_|<>~#*]"me=e-1 contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
384 syn match perlFormatField "@$" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
385
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
386 " __END__ and __DATA__ clauses
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
387 if exists("perl_fold")
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
388 syntax region perlDATA start="^__\%(DATA\|END\)__$" skip="." end="." contains=perlPOD,@perlDATA fold
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
389 else
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
390 syntax region perlDATA start="^__\%(DATA\|END\)__$" skip="." end="." contains=perlPOD,@perlDATA
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
391 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
392
2548
0bb74f626ba7 Update to Perl runtime files. (Andy Lester)
Bram Moolenaar <bram@vim.org>
parents: 2531
diff changeset
393 "
0bb74f626ba7 Update to Perl runtime files. (Andy Lester)
Bram Moolenaar <bram@vim.org>
parents: 2531
diff changeset
394 " Folding
0bb74f626ba7 Update to Perl runtime files. (Andy Lester)
Bram Moolenaar <bram@vim.org>
parents: 2531
diff changeset
395
0bb74f626ba7 Update to Perl runtime files. (Andy Lester)
Bram Moolenaar <bram@vim.org>
parents: 2531
diff changeset
396 if exists("perl_fold")
0bb74f626ba7 Update to Perl runtime files. (Andy Lester)
Bram Moolenaar <bram@vim.org>
parents: 2531
diff changeset
397 " Note: this bit must come before the actual highlighting of the "package"
0bb74f626ba7 Update to Perl runtime files. (Andy Lester)
Bram Moolenaar <bram@vim.org>
parents: 2531
diff changeset
398 " keyword, otherwise this will screw up Pod lines that match /^package/
0bb74f626ba7 Update to Perl runtime files. (Andy Lester)
Bram Moolenaar <bram@vim.org>
parents: 2531
diff changeset
399 if !exists("perl_nofold_packages")
0bb74f626ba7 Update to Perl runtime files. (Andy Lester)
Bram Moolenaar <bram@vim.org>
parents: 2531
diff changeset
400 syn region perlPackageFold start="^package \S\+;\s*\%(#.*\)\=$" end="^1;\=\s*\%(#.*\)\=$" end="\n\+package"me=s-1 transparent fold keepend
0bb74f626ba7 Update to Perl runtime files. (Andy Lester)
Bram Moolenaar <bram@vim.org>
parents: 2531
diff changeset
401 endif
0bb74f626ba7 Update to Perl runtime files. (Andy Lester)
Bram Moolenaar <bram@vim.org>
parents: 2531
diff changeset
402 if !exists("perl_nofold_subs")
0bb74f626ba7 Update to Perl runtime files. (Andy Lester)
Bram Moolenaar <bram@vim.org>
parents: 2531
diff changeset
403 syn region perlSubFold start="^\z(\s*\)\<sub\>.*[^};]$" end="^\z1}\s*\%(#.*\)\=$" transparent fold keepend
0bb74f626ba7 Update to Perl runtime files. (Andy Lester)
Bram Moolenaar <bram@vim.org>
parents: 2531
diff changeset
404 syn region perlSubFold start="^\z(\s*\)\<\%(BEGIN\|END\|CHECK\|INIT\|UNITCHECK\)\>.*[^};]$" end="^\z1}\s*$" transparent fold keepend
0bb74f626ba7 Update to Perl runtime files. (Andy Lester)
Bram Moolenaar <bram@vim.org>
parents: 2531
diff changeset
405 endif
0bb74f626ba7 Update to Perl runtime files. (Andy Lester)
Bram Moolenaar <bram@vim.org>
parents: 2531
diff changeset
406
0bb74f626ba7 Update to Perl runtime files. (Andy Lester)
Bram Moolenaar <bram@vim.org>
parents: 2531
diff changeset
407 if exists("perl_fold_blocks")
0bb74f626ba7 Update to Perl runtime files. (Andy Lester)
Bram Moolenaar <bram@vim.org>
parents: 2531
diff changeset
408 syn region perlBlockFold start="^\z(\s*\)\%(if\|elsif\|unless\|for\|while\|until\|given\)\s*(.*)\%(\s*{\)\=\s*\%(#.*\)\=$" start="^\z(\s*\)foreach\s*\%(\%(my\|our\)\=\s*\S\+\s*\)\=(.*)\%(\s*{\)\=\s*\%(#.*\)\=$" end="^\z1}\s*;\=\%(#.*\)\=$" transparent fold keepend
0bb74f626ba7 Update to Perl runtime files. (Andy Lester)
Bram Moolenaar <bram@vim.org>
parents: 2531
diff changeset
409 syn region perlBlockFold start="^\z(\s*\)\%(do\|else\)\%(\s*{\)\=\s*\%(#.*\)\=$" end="^\z1}\s*while" end="^\z1}\s*;\=\%(#.*\)\=$" transparent fold keepend
0bb74f626ba7 Update to Perl runtime files. (Andy Lester)
Bram Moolenaar <bram@vim.org>
parents: 2531
diff changeset
410 endif
0bb74f626ba7 Update to Perl runtime files. (Andy Lester)
Bram Moolenaar <bram@vim.org>
parents: 2531
diff changeset
411
0bb74f626ba7 Update to Perl runtime files. (Andy Lester)
Bram Moolenaar <bram@vim.org>
parents: 2531
diff changeset
412 setlocal foldmethod=syntax
0bb74f626ba7 Update to Perl runtime files. (Andy Lester)
Bram Moolenaar <bram@vim.org>
parents: 2531
diff changeset
413 syn sync fromstart
0bb74f626ba7 Update to Perl runtime files. (Andy Lester)
Bram Moolenaar <bram@vim.org>
parents: 2531
diff changeset
414 else
0bb74f626ba7 Update to Perl runtime files. (Andy Lester)
Bram Moolenaar <bram@vim.org>
parents: 2531
diff changeset
415 " fromstart above seems to set minlines even if perl_fold is not set.
0bb74f626ba7 Update to Perl runtime files. (Andy Lester)
Bram Moolenaar <bram@vim.org>
parents: 2531
diff changeset
416 syn sync minlines=0
0bb74f626ba7 Update to Perl runtime files. (Andy Lester)
Bram Moolenaar <bram@vim.org>
parents: 2531
diff changeset
417 endif
0bb74f626ba7 Update to Perl runtime files. (Andy Lester)
Bram Moolenaar <bram@vim.org>
parents: 2531
diff changeset
418
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
419 command -nargs=+ HiLink hi def link <args>
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
420
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
421 " The default highlighting.
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
422 HiLink perlSharpBang PreProc
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
423 HiLink perlControl PreProc
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
424 HiLink perlInclude Include
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
425 HiLink perlSpecial Special
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
426 HiLink perlString String
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
427 HiLink perlCharacter Character
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
428 HiLink perlNumber Number
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
429 HiLink perlFloat Float
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
430 HiLink perlType Type
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
431 HiLink perlIdentifier Identifier
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
432 HiLink perlLabel Label
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
433 HiLink perlStatement Statement
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
434 HiLink perlConditional Conditional
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
435 HiLink perlRepeat Repeat
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
436 HiLink perlOperator Operator
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
437 HiLink perlFunction Keyword
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
438 HiLink perlSubName Function
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
439 HiLink perlSubPrototype Type
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
440 HiLink perlSubAttributes PreProc
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
441 HiLink perlSubAttributesCont perlSubAttributes
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
442 HiLink perlComment Comment
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
443 HiLink perlTodo Todo
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
444 if exists("perl_string_as_statement")
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
445 HiLink perlStringStartEnd perlStatement
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
446 else
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
447 HiLink perlStringStartEnd perlString
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
448 endif
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
449 HiLink perlVStringV perlStringStartEnd
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
450 HiLink perlList perlStatement
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
451 HiLink perlMisc perlStatement
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
452 HiLink perlVarPlain perlIdentifier
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
453 HiLink perlVarPlain2 perlIdentifier
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
454 HiLink perlArrow perlIdentifier
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
455 HiLink perlFiledescRead perlIdentifier
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
456 HiLink perlFiledescStatement perlIdentifier
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
457 HiLink perlVarSimpleMember perlIdentifier
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
458 HiLink perlVarSimpleMemberName perlString
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
459 HiLink perlVarNotInMatches perlIdentifier
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
460 HiLink perlVarSlash perlIdentifier
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
461 HiLink perlQQ perlString
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
462 HiLink perlHereDoc perlString
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
463 HiLink perlStringUnexpanded perlString
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
464 HiLink perlSubstitutionSQ perlString
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
465 HiLink perlSubstitutionGQQ perlString
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
466 HiLink perlTranslationGQ perlString
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
467 HiLink perlMatch perlString
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
468 HiLink perlMatchStartEnd perlStatement
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
469 HiLink perlFormatName perlIdentifier
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
470 HiLink perlFormatField perlString
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
471 HiLink perlPackageDecl perlType
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
472 HiLink perlStorageClass perlType
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
473 HiLink perlPackageRef perlType
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
474 HiLink perlStatementPackage perlStatement
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
475 HiLink perlStatementStorage perlStatement
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
476 HiLink perlStatementControl perlStatement
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
477 HiLink perlStatementScalar perlStatement
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
478 HiLink perlStatementRegexp perlStatement
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
479 HiLink perlStatementNumeric perlStatement
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
480 HiLink perlStatementList perlStatement
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
481 HiLink perlStatementHash perlStatement
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
482 HiLink perlStatementIOfunc perlStatement
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
483 HiLink perlStatementFiledesc perlStatement
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
484 HiLink perlStatementVector perlStatement
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
485 HiLink perlStatementFiles perlStatement
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
486 HiLink perlStatementFlow perlStatement
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
487 HiLink perlStatementInclude perlStatement
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
488 HiLink perlStatementProc perlStatement
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
489 HiLink perlStatementSocket perlStatement
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
490 HiLink perlStatementIPC perlStatement
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
491 HiLink perlStatementNetwork perlStatement
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
492 HiLink perlStatementPword perlStatement
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
493 HiLink perlStatementTime perlStatement
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
494 HiLink perlStatementMisc perlStatement
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
495 HiLink perlStatementIndirObj perlStatement
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
496 HiLink perlFunctionName perlIdentifier
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
497 HiLink perlMethod perlIdentifier
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
498 HiLink perlFunctionPRef perlType
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
499 HiLink perlPOD perlComment
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
500 HiLink perlShellCommand perlString
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
501 HiLink perlSpecialAscii perlSpecial
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
502 HiLink perlSpecialDollar perlSpecial
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
503 HiLink perlSpecialString perlSpecial
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
504 HiLink perlSpecialStringU perlSpecial
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
505 HiLink perlSpecialMatch perlSpecial
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
506 HiLink perlDATA perlComment
1118
2b8ff9e3c520 updated for version 7.1a
vimboss
parents: 557
diff changeset
507
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
508 " Possible errors
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
509 HiLink perlNotEmptyLine Error
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
510 HiLink perlElseIfError Error
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
511 HiLink perlSubPrototypeError Error
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
512 HiLink perlSubError Error
1118
2b8ff9e3c520 updated for version 7.1a
vimboss
parents: 557
diff changeset
513
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
514 delcommand HiLink
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
515
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
516 " Syncing to speed up processing
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
517 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
518 if !exists("perl_no_sync_on_sub")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
519 syn sync match perlSync grouphere NONE "^\s*\<package\s"
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
520 syn sync match perlSync grouphere NONE "^\s*\<sub\>"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
521 syn sync match perlSync grouphere NONE "^}"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
522 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
523
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
524 if !exists("perl_no_sync_on_global_var")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
525 syn sync match perlSync grouphere NONE "^$\I[[:alnum:]_:]+\s*=\s*{"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
526 syn sync match perlSync grouphere NONE "^[@%]\I[[:alnum:]_:]+\s*=\s*("
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
527 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
528
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
529 if exists("perl_sync_dist")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
530 execute "syn sync maxlines=" . perl_sync_dist
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
531 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
532 syn sync maxlines=100
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
533 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
534
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
535 syn sync match perlSyncPOD grouphere perlPOD "^=pod"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
536 syn sync match perlSyncPOD grouphere perlPOD "^=head"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
537 syn sync match perlSyncPOD grouphere perlPOD "^=item"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
538 syn sync match perlSyncPOD grouphere NONE "^=cut"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
539
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
540 let b:current_syntax = "perl"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
541
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
542 " XXX Change to sts=4:sw=4
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1118
diff changeset
543 " vim:ts=8:sts=2:sw=2:expandtab:ft=vim