blob: 1d30472bbe0026fc270ba38a9a0b6e24fb25a1cd [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim Compiler File
2" Compiler: Perl syntax checks (perl -Wc)
3" Maintainer: Christian J. Robinson <infynity@onewest.net>
4" Last Change: 2004 Mar 27
5
6if exists("current_compiler")
7 finish
8endif
9let current_compiler = "perl"
10
11if exists(":CompilerSet") != 2 " older Vim always used :setlocal
12 command -nargs=* CompilerSet setlocal <args>
13endif
14
15let s:savecpo = &cpo
16set cpo&vim
17
18if getline(1) =~# '-[^ ]*T'
19 CompilerSet makeprg=perl\ -WTc\ %
20else
21 CompilerSet makeprg=perl\ -Wc\ %
22endif
23
24CompilerSet errorformat=
25 \%-G%.%#had\ compilation\ errors.,
26 \%-G%.%#syntax\ OK,
27 \%m\ at\ %f\ line\ %l.,
28 \%+A%.%#\ at\ %f\ line\ %l\\,%.%#,
29 \%+C%.%#
30
31" Explanation:
32" %-G%.%#had\ compilation\ errors., - Ignore the obvious.
33" %-G%.%#syntax\ OK, - Don't include the 'a-okay' message.
34" %m\ at\ %f\ line\ %l., - Most errors...
35" %+A%.%#\ at\ %f\ line\ %l\\,%.%#, - As above, including ', near ...'
36" %+C%.%# - ... Which can be multi-line.
37
38let &cpo = s:savecpo
39unlet s:savecpo