Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vim E854: path too long for completion

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:

Screenshot of the error message

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?

like image 541
Goles Avatar asked Mar 06 '12 19:03

Goles


1 Answers

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.

like image 108
Goles Avatar answered Oct 15 '22 12:10

Goles