I have a Rails RSpec file which looks something like
require 'spec_helper'
describe "Something" do
...
end
When I try to use Ctrl+N to autocomplete anything in that file, I get:
Text version:
Scanning included file: spec_helper.rb
E854: path too long for completion
Press ENTER or type command to continue
If I Ctrl+C this, it completes my word perfectly.
To avoid Vim to autocomplete by using included files I can do:
:set complete-=i
But that's not the root of the issue.
How can I fix this?
Ok,
It results that I am using MacVim, and like romainl commented in the original post, the issue is related to a bug in ruby.vim. In this Stack Overflow post the third answer candidate actually suggests a possible cause (correctly), which is related to a bug in ruby.vim ( an old version is using a deprecated function ).
MacVim (Snapshot 64) is supplied with the old rails.vim, so to fix this I went into MacVim.app/Contents/Resources/vim/runtime/ftplugin
and did wget to the raw file in the official rails.vim plug-in repo
This fixed the issue for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With