Vim taking really long time to open Ruby files

The delay is attributable to ftplugin/ruby.vim querying the Ruby load path. Just days ago, I significantly improved the speed of this by dropping the querying of Ruby Gems. My Mac currently reports that it takes about 125 ms, a significant improvement. So you might try updating to the latest.

If that still isn't enough, you can disable the load path querying entirely by setting g:ruby_path in your vimrc.

try to add this to .vimrc file (in your home folder):

if !empty($MY_RUBY_HOME)
 let g:ruby_path = join(split(glob($MY_RUBY_HOME.'/lib/ruby/*.*')."\n".glob($MY_RUBY_HOME.'/lib/rubysite_ruby/*'),"\n"),',')
endif

Tags:

Ruby

Vim