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