Skip to content

Instantly share code, notes, and snippets.

@reinh
Created April 2, 2010 17:49
Show Gist options
  • Save reinh/353440 to your computer and use it in GitHub Desktop.
Save reinh/353440 to your computer and use it in GitHub Desktop.
augroup RUBY
autocmd!
autocmd BufNewFile,BufRead *_test.rb compiler rubyunit
augroup END
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
command -nargs=* CompilerSet setlocal <args>
endif
let s:cpo_save = &cpo
set cpo-=C
CompilerSet makeprg=testrb
CompilerSet errorformat=\%W\ %\\+%\\d%\\+)\ Failure:,
\%C%m\ [%f:%l]:,
\%E\ %\\+%\\d%\\+)\ Error:,
\%C%m:,
\%C\ \ \ \ [%f:%l:%.%#,
\%C\ \ \ \ %f:%l:%.%#,
\%C%m,
\%Z\ %#,
\%-G%.%#
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: nowrap sw=2 sts=2 ts=8:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment