From bf56b92b39708d69845ed15d5d6c9ea954ee2bc7 Mon Sep 17 00:00:00 2001 From: Szymon Wrozynski Date: Wed, 4 Jul 2012 22:17:05 +0200 Subject: [PATCH] Adds jruby errorformat --- syntax_checkers/ruby/jruby.vim | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/syntax_checkers/ruby/jruby.vim b/syntax_checkers/ruby/jruby.vim index bec5168a..b3c416df 100644 --- a/syntax_checkers/ruby/jruby.vim +++ b/syntax_checkers/ruby/jruby.vim @@ -10,7 +10,12 @@ " "============================================================================ function! SyntaxCheckers_ruby_GetLocList() - "let makeprg = '' - "let errorformat = '' - "return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) + if has('win32') + let makeprg = 'jruby -W1 -T1 -c '.shellescape(expand('%')) + else + let makeprg = 'RUBYOPT= jruby -W1 -c '.shellescape(expand('%')) + endif + let errorformat = '%-GSyntax OK for %f,%ESyntaxError in %f:%l: syntax error\, %m,%Z%p^,%W%f:%l: warning: %m,%Z%p^,%W%f:%l: %m,%-C%.%#' + + return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) endfunction