1" Vim compiler file 2" Compiler: Ruby syntax check and/or error reporting 3" Maintainer: Tim Hammerquist <[email protected]> 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 <[email protected]> 13" Doug Kearns <[email protected]> 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 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 63