1" Vim compiler file 2" Language: Ruby 3" Function: Syntax check and/or error reporting 4" Maintainer: Tim Pope <[email protected]> 5" URL: https://github.com/vim-ruby/vim-ruby 6" Release Coordinator: Doug Kearns <[email protected]> 7" ---------------------------------------------------------------------------- 8 9if exists("current_compiler") 10 finish 11endif 12let current_compiler = "ruby" 13 14if exists(":CompilerSet") != 2 " older Vim always used :setlocal 15 command -nargs=* CompilerSet setlocal <args> 16endif 17 18let s:cpo_save = &cpo 19set cpo-=C 20 21" default settings runs script normally 22" add '-c' switch to run syntax check only: 23" 24" CompilerSet makeprg=ruby\ -wc\ $* 25" 26" or add '-c' at :make command line: 27" 28" :make -c %<CR> 29" 30CompilerSet makeprg=ruby\ -w\ $* 31 32CompilerSet errorformat= 33 \%+E%f:%l:\ parse\ error, 34 \%W%f:%l:\ warning:\ %m, 35 \%E%f:%l:in\ %*[^:]:\ %m, 36 \%E%f:%l:\ %m, 37 \%-C%\tfrom\ %f:%l:in\ %.%#, 38 \%-Z%\tfrom\ %f:%l, 39 \%-Z%p^, 40 \%-G%.%# 41 42let &cpo = s:cpo_save 43unlet s:cpo_save 44 45" vim: nowrap sw=2 sts=2 ts=8: 46