Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

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 August 13, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Jul 31, 2012
Andrew Garson Add efm if the current interpreter is jruby because it prepends
"SyntaxError in" to errors from "ruby -c"
da4b849
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 14 additions and 4 deletions. Show diff stats Hide diff stats

  1. 18  autoload/checksyntax/defs/ruby.vim
18  autoload/checksyntax/defs/ruby.vim
@@ -7,10 +7,20 @@
7 7
 
8 8
 
9 9
 if !exists('g:checksyntax.ruby')
10  
-    let g:checksyntax['ruby'] = {
11  
-                \ 'prepare': 'compiler ruby',
12  
-                \ 'cmd': 'ruby -c',
13  
-                \ }
  10
+    let ruby_interpreter = system('ruby --version')
  11
+    if match(ruby_interpreter, 'jruby') == -1
  12
+      let g:checksyntax['ruby'] = {
  13
+            \ 'prepare': 'compiler ruby',
  14
+            \ 'cmd': 'ruby -c',
  15
+            \ }
  16
+    else
  17
+      let g:checksyntax['ruby'] = {
  18
+            \ 'prepare': 'compiler ruby',
  19
+            \ 'efm': 'SyntaxError in %f:%l:%m',
  20
+            \ 'cmd': 'ruby -c',
  21
+            \ }
  22
+
  23
+    endif
14 24
 endif
15 25
 
16 26
 
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.