Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix - Unable to jump to error in buffer from loc of qf list under jruby #13

Closed
wants to merge 1 commit into from

2 participants

Andrew Garson Tom Link
Andrew Garson

Jruby prepends "SyntaxError in" to the output of "ruby -c". This breaks loc and qf lists being able to jump the error.

Tom Link
Owner

Is there a ruby executable available if jruby is used (e.g. on windows)? I included your change in commit 1ef9ab8 anyway.

Tom Link tomtom closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 31, 2012
  1. Andrew Garson

    Add efm if the current interpreter is jruby because it prepends

    andrewGarson authored
    "SyntaxError in" to errors from "ruby -c"
This page is out of date. Refresh to see the latest.
Showing with 14 additions and 4 deletions.
  1. +14 −4 autoload/checksyntax/defs/ruby.vim
18 autoload/checksyntax/defs/ruby.vim
View
@@ -7,10 +7,20 @@
if !exists('g:checksyntax.ruby')
- let g:checksyntax['ruby'] = {
- \ 'prepare': 'compiler ruby',
- \ 'cmd': 'ruby -c',
- \ }
+ let ruby_interpreter = system('ruby --version')
+ if match(ruby_interpreter, 'jruby') == -1
+ let g:checksyntax['ruby'] = {
+ \ 'prepare': 'compiler ruby',
+ \ 'cmd': 'ruby -c',
+ \ }
+ else
+ let g:checksyntax['ruby'] = {
+ \ 'prepare': 'compiler ruby',
+ \ 'efm': 'SyntaxError in %f:%l:%m',
+ \ 'cmd': 'ruby -c',
+ \ }
+
+ endif
endif
Something went wrong with that request. Please try again.