Forums | Admin

Discussion Forums: open-discussion

Start New Thread Start New Thread

 

By: Xavier Shay
RE: rant.vim: a rant compiler plugin for vim [ reply ]  
2006-12-09 20:53
Thanks 稜剛 張簡,
I have forwarded your script to our mailing list where it will receive a greater audience.

Please be aware that rant has moved to http://rant.rubyforge.org

Cheers,
Xavier

By: 稜剛 張簡
rant.vim: a rant compiler plugin for vim [ reply ]  
2006-12-09 15:27
i wrote a vim script to support vim quickfix your Rantfile.
copy the following file into vim/compiler dir.

====file:rant.vim========
"rant compilier
if exists("current_compiler")
finish
endif
let current_compiler = "rant"

if exists(":CompilerSet") != 2 " older Vim always used :setlocal
command -nargs=* CompilerSet setlocal <args>
endif

let s:cpo_save = &cpo
set cpo-=C

" default settings runs script normally
" add '-c' switch to run syntax check only:
"
" CompilerSet makeprg=ruby\ -wc\ $*
"
" or add '-c' at :make command line:
"
" :make -c %<CR>
"
CompilerSet makeprg=rant\ $*

"A rant error message example;
"rant: [ERROR] in file `C:/vim/vim70/compiler/Rantfile', line 4:
" NameError: undefined local variable or method `w' for main:Object

CompilerSet errorformat=
\%Erant:\ [ERROR]\ in\ file\ `%f'\\,\ line\ %l:%.%#,%Z%m

let &cpo = s:cpo_save
unlet s:cpo_save

" vim: nowrap sw=2 sts=2 ts=8 ff=unix