1" Vim compiler file 2" Language: Ruby 3" Function: Syntax check and/or error reporting 4" Maintainer: Tim Hammerquist <timh at rubyforge.org> 5" Info: $Id$ 6" URL: http://vim-ruby.rubyforge.org 7" Anon CVS: See above site 8" ---------------------------------------------------------------------------- 9" 10" Changelog: 11" 0.2: script saves and restores 'cpoptions' value to prevent problems with 12" line continuations 13" 0.1: initial release 14" 15" Contributors: 16" Hugh Sasse <[email protected]> 17" Doug Kearns <[email protected]> 18" 19" Todo: 20" match error type %m 21" 22" Comments: 23" I know this file isn't perfect. If you have any questions, suggestions, 24" patches, etc., please don't hesitate to let me know. 25" 26" This is my first experience with 'errorformat' and compiler plugins and 27" I welcome any input from more experienced (or clearer-thinking) 28" individuals. 29" ---------------------------------------------------------------------------- 30 31if exists("current_compiler") 32 finish 33endif 34let current_compiler = "ruby" 35 36if exists(":CompilerSet") != 2 " older Vim always used :setlocal 37 command -nargs=* CompilerSet setlocal <args> 38endif 39 40let s:cpo_save = &cpo 41set cpo-=C 42 43" default settings runs script normally 44" add '-c' switch to run syntax check only: 45" 46" CompilerSet makeprg=ruby\ -wc\ $* 47" 48" or add '-c' at :make command line: 49" 50" :make -c %<CR> 51" 52CompilerSet makeprg=ruby\ -w\ $* 53 54CompilerSet errorformat= 55 \%+E%f:%l:\ parse\ error, 56 \%W%f:%l:\ warning:\ %m, 57 \%E%f:%l:in\ %*[^:]:\ %m, 58 \%E%f:%l:\ %m, 59 \%-C%\tfrom\ %f:%l:in\ %.%#, 60 \%-Z%\tfrom\ %f:%l, 61 \%-Z%p^, 62 \%-G%.%# 63 64let &cpo = s:cpo_save 65unlet s:cpo_save 66 67" vim: nowrap sw=2 sts=2 ts=8 ff=unix: 68