Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7536179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T06:30:21+00:00 2026-05-30T06:30:21+00:00

My vim is throwing nasty errors 50% of the time when I use ctrl-n

  • 0

My vim is throwing nasty errors 50% of the time when I use ctrl-n for completion

E854: path too long for completion

I really want to remap this, and call it with the :silent option to suppress the error, but I have no idea what function provides completion, so I can’t remap it.

So my question is where can I find exactly what C-N calls when it is invoked in insert mode

Solution:

As mentioned in the comment on my accepted answer I found a way round this. Based off the instructions on building your own vim here : brilliantcorners.org/2011/02/building-vim-on-osx-snow-leopard

I grepped the source directory for E854 and it only comes up in 1 file. If you open that file you see it is only referenced twice. I just removed those error calls and built vim

This doesn’t solve whatever the actual problem is, but it’s the same effect as doing ignore. It works great now and doesn’t throw any errors, I hope anyone else with this problem is helped by this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T06:30:22+00:00Added an answer on May 30, 2026 at 6:30 am

    My copy of the vim source code (obtained at some point using Mercurial and hg clone https://vim.googlecode.com/hg/) finds that error being thrown only in one spot, in the internal function vim_findfile_init():

    static char_u e_pathtoolong[] = N_("E854: path too long for completion");
    
    ...
    
    
    /*
     * copy wc_path and add restricts to the '**' wildcard.
     * The octet after a '**' is used as a (binary) counter.
     * So '**3' is transposed to '**^C' ('^C' is ASCII value 3)
     * or '**76' is transposed to '**N'( 'N' is ASCII value 76).
     * For EBCDIC you get different character values.
     * If no restrict is given after '**' the default is used.
     * Due to this technique the path looks awful if you print it as a
     * string.
     */
    len = 0;
    while (*wc_part != NUL)
    {
        if (len + 5 >= MAXPATHL)
        {
            EMSG(_(e_pathtoolong));
            break;
        }
    
    ...
    

    So it looks like it’s doing arbitrary-depth wildcard expansion. If I had to take a wild stab I’d say you have a path somewhere in the filesystem that has a circular symbolic link (say c -> a), so you end up doing path completion and getting /foo/bar/a/b/c/a/b/c/a/b/c/a/b/c/….. and the limit gets hit.

    Edit

    Scratch that last theory; based on actually reading the code, it looks like it’s trying to find a tag file and blowing up. Can you post what you get when you do :set tags ?

    Edit 2

    Sigh, it’s late… Here’s the answer you originally wanted that I just found: do :help completefunc and :help completion-functions. completefunc is the one you want, if I (finally) understand your question.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Lately vim takes a long time to start up when I'm running it to
Using Vim I often want to replace a block of code with a block
Vim completes words and lines with CTRL-X P and CTRL-L. There's a Emacs plugin
In vim, I want to create a new command that takes a file-name as
Vim is almost perfect for me. But I still want a line comment and
Vim's Ctrl + N generally works like this: I type few letters, hit Ctrl
In VIM, I want to execute a command (like :!mkdir src/main/scala/xxx ) Then, I
Vim is acting slow when I scroll. The cursor skips some lines when I'm
Vim is my favorite tool for programming in OSX, but my team mate all
Vim % operator jumps to matching parentheses, comment ends and a few other things.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.