Conflict with ruby.vim on Windows
-
Joel Elkins
I am using vim 7.3.289 (built with ruby 1.8.7) vim with Command-T 1.3 on windows. Command T is quite stable and works well in general. However, the following error appears when opening a
.rb
file from CommandT browser. Aside from the error message, the file opens and edits just fine. (I also pulled the latest git of ruby.vim (f265e6b) with same result.)If this is a duplicate report, I apologize.
Error detected while processing C:\Users\jelkins\vimfiles\bundle\vim-ruby-vim-ruby-f265e6b\ftplugin\ruby.vim: line 71: NoMethodError: undefined method `command' for CommandT::VIM:Module line 94: E121: Undefined variable: s:ruby_path E15: Invalid expression: s:ruby_path line 71: NoMethodError: undefined method `command' for CommandT::VIM:Module line 94: E121: Undefined variable: s:ruby_path E15: Invalid expression: s:ruby_path
It appears to be caused by this section in
ftplugin/ruby.vim
elseif has("ruby") && has("win32") ruby VIM::command( 'let s:ruby_path = "%s"' % ($: + begin; require %q{rubygems}; Gem.all_load_paths.sort.uniq; rescue LoadError; []; end).join(%q{,}) ) let s:ruby_path = '.,' . substitute(s:ruby_path, '\%(^\|,\)\.\%(,\|$\)', ',,', '')
-
Greg Hurrell
See ticket #1752. I think I might end up defining a
command
method onCommandT::VIM
just to silence this. -
Joel Elkins
I submitted a pull request to vim-ruby with the fix identified by others (and confirmed to work for me), which is to invoke
::VIM::command
rather thanVIM::command
inftplugin/ruby.vim
. We'll see if they agree. -
Greg Hurrell
Nice, we can hope. In the meantime, makes sense for me to implement the workaround mentioned above.
-
Joel Elkins
Sounds like a good plan, thanks!
-
Joel Elkins
Patch was merged upstream, FYI
-
Greg Hurrell
Nice!
Reply
This topic is now closed.