Mercurial > vim
comparison runtime/compiler/ruby.vim @ 7:3fc0f57ecb91 v7.0001
updated for version 7.0001
author | vimboss |
---|---|
date | Sun, 13 Jun 2004 20:20:40 +0000 |
parents | |
children | 125e80798a85 |
comparison
equal
deleted
inserted
replaced
6:c2daee826b8f | 7:3fc0f57ecb91 |
---|---|
1 " 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> | |
13 " Doug Kearns <djkea2@mugca.its.monash.edu.au> | |
14 " | |
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 | |
26 if exists("current_compiler") | |
27 finish | |
28 endif | |
29 let current_compiler = "ruby" | |
30 | |
31 if exists(":CompilerSet") != 2 " older Vim always used :setlocal | |
32 command -nargs=* CompilerSet setlocal <args> | |
33 endif | |
34 | |
35 let s:cpo_save = &cpo | |
36 set 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 " | |
47 CompilerSet makeprg=ruby\ -w\ $* | |
48 | |
49 CompilerSet 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 | |
59 let &cpo = s:cpo_save | |
60 unlet s:cpo_save | |
61 | |
62 " vim: ft=vim |