blob: bfb83707a3e03749113181c5fbecd781d0c05d2d [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim compiler file
2" Compiler: Ruby syntax check and/or error reporting
3" Maintainer: Tim Hammerquist <timmy@cpan.org>
4" Last Change: Tue Jul 16 00:38:00 PDT 2002
5"
6" Changelog:
7" 0.2: script saves and restores 'cpoptions' value to prevent problems with
8" line continuations
9" 0.1: initial release
10"
11" Contributors:
12" Hugh Sasse <hgs@dmu.ac.uk>
Bram Moolenaar293ee4d2004-12-09 21:34:53 +000013" Doug Kearns <djkea2@gus.gscit.monash.edu.au>
Bram Moolenaar071d4272004-06-13 20:20:40 +000014"
15" Todo:
16" match error type %m
17"
18" Comments:
19" I know this file isn't perfect. If you have any questions, suggestions,
20" patches, etc., please don't hesitate to let me know.
21"
22" This is my first experience with 'errorformat' and compiler plugins and
23" I welcome any input from more experienced (or clearer-thinking)
24" individuals.
25
26if exists("current_compiler")
27 finish
28endif
29let current_compiler = "ruby"
30
31if exists(":CompilerSet") != 2 " older Vim always used :setlocal
32 command -nargs=* CompilerSet setlocal <args>
33endif
34
35let s:cpo_save = &cpo
36set cpo-=C
37
38" default settings runs script normally
39" add '-c' switch to run syntax check only:
40"
41" CompilerSet makeprg=ruby\ -wc\ $*
42"
43" or add '-c' at :make command line:
44"
45" :make -c %<CR>
46"
47CompilerSet makeprg=ruby\ -w\ $*
48
49CompilerSet errorformat=
50 \%+E%f:%l:\ parse\ error,
51 \%W%f:%l:\ warning:\ %m,
52 \%E%f:%l:in\ %*[^:]:\ %m,
53 \%E%f:%l:\ %m,
54 \%-C%\tfrom\ %f:%l:in\ %.%#,
55 \%-Z%\tfrom\ %f:%l,
56 \%-Z%p^,
57 \%-G%.%#
58
59let &cpo = s:cpo_save
60unlet s:cpo_save
61
62" vim: ft=vim