From b6bfca9701704e92c090731ab2ef905279a48fbb Mon Sep 17 00:00:00 2001 From: Dominique Rose-Rosette Date: Thu, 3 Feb 2011 12:48:12 +0100 Subject: [PATCH] Braindead "fix" for Rails 3's eruby sytax Rails 3 ships with its own version of Erb. Plain old Erb barfes on things like <%= form_for ... do %> instead of old <% form_for ... do %> For the moment, let's use sed to filter out this case. Dirty kludge, but that will do for now. --- syntax_checkers/eruby.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syntax_checkers/eruby.vim b/syntax_checkers/eruby.vim index af07270b..27335298 100644 --- a/syntax_checkers/eruby.vim +++ b/syntax_checkers/eruby.vim @@ -20,7 +20,7 @@ if !executable("ruby") || !executable("cat") endif function! SyntaxCheckers_eruby_GetLocList() - let makeprg='cat '. shellescape(expand("%")) . ' \| RUBYOPT= ruby -e "require \"erb\"; puts ERB.new(ARGF.read, nil, \"-\").src" \| RUBYOPT= ruby -c' + let makeprg='sed "s/<%=/<%/g" '. shellescape(expand("%")) . ' \| RUBYOPT= ruby -e "require \"erb\"; puts ERB.new(ARGF.read, nil, \"-\").src" \| RUBYOPT= ruby -c' let errorformat='%-GSyntax OK,%E-:%l: syntax error\, %m,%Z%p^,%W-:%l: warning: %m,%Z%p^,%-C%.%#' let loclist = SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })