Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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