ohmyzsh: _arguments:448: _vim_files: function definition file not found

when I try autocomplete a name of file for vim, example I try open .vimrc I get

 $ vim ~/.vim<TAB>
 _arguments:448: _vim_files: function definition file not found
 _arguments:448: _vim_files: function definition file not found
 _arguments:448: _vim_files: function definition file not found
 $ vim ~/.vim

About this issue

  • Original URL
  • State: closed
  • Created 13 years ago
  • Reactions: 38
  • Comments: 69 (2 by maintainers)

Commits related to this issue

Most upvoted comments

janpabloaj: I’m new to zsh and to zcompdump, however this problem seems to resolve by removing (or moving away) your ~/.zcompdump file: rm ~/.zcompdump*

The issue appears not to be directly related to oh-my-zsh.

Just run exec zsh to solve this.

If somebody will be affected by this problem: on my machine I needed to remove file ~/.zcompdump-hostname-5.0.5 instead of ~/.zcompdump

I ran into this problem after adding setopt HIST_IGNORE_ALL_DUPS to ~/.zshrc.

removing ~/.zcompdump and restarting all shells fixed it.

for antigen users, it’s also useful

rm ~/.antigen/.zcompdump*
exec zsh

Removing ~/.zcompdump and restarting all shells fixed it for me as well!

rm .zcompdump* exec zsh

(for zplug users) rm ~/.zcompdump* rm ~/.zplug/zcompdump* exec zsh

Except from ~/.zcondump, I had to delete zcondump from .zplug/ (the plugin manager i use). So i guess if anyone else using a plugin manager or a different than mine, might want to check that too.

Edit: I still get the error, i have to search more i guess Edit2: (Im updating this comment after months) I don’t get the error anymore but I don’t remember what fixed it 😐

I also get the error, even after rm ~/.zcompdump* && exec zsh, hmm.

For future fellows, here’s the simple explanation of why this happens:

When zsh runs, it saves completion data in .zcompdump to make for faster completion later. For those who are on multiple machines regularly with the same homedir exported to those machines, you’ll also get .zcompdump-$(hostname -s)-<zsh version number> files.

Since it’s saving this data, it’s effectively making a snapshot of what’s there at that time. If the installed packages change, you can witness cases where the zcompdump data is not just out-of-date but will actually cause errors.

If you have this problem with a single machine in your environment, then you should delete the .zcompdump files specifically for that machine and either run exec zsh or simply log out and back in to have a new .zcompdump file created for that machine specifically. After this, the single machine should behave for any new sessions on that machine.

If you have a problem with many machines in your environment, or if it’s something like all but one machine, delete your primary .zcompdump file and all of the host-specific zcompdump files for the problem hosts, and then ssh into one of the machines that was affected. After that, new sessions on any of the affected machines should behave.

@jamespullar This is how I fixed it with neovim 0.1.7 and zplug 2.4.1

rm -rf ~/.zcompdump* 
rm -rf /usr/local/opt/zplug/zcomp* 
exec zsh

@iamkarlson thanks

rm ~/.antigen/.zcompdump*
exec zsh

that worked for me!

rm ~/.zcompdump*
exec zsh

Solved my problem. Thx @sishuiliunian

rm ~/.zcondump* 
exec zsh

Doesn’t work for me

rm ~/.zcondump* exec zsh

then it works, thanks!

rm ~/.zcompdump* rm ~/.zplug/zcompdump exec zsh

I had to remove zcompdump in both locations to get it to work.

rm -rf ~/.zcompdump* exec zsh

if you use tmux, you need to detach, and attach to the session. Then it will work.

Just run exec zsh to solve this.

This worked for me, thanks, @holys.

This works for me, for a day, then I have to rm ~/.antigen/.zcompdump* again - anyone have any idea what is causing this?

rm ~/.zcondump*, then restart the terminal, OK

Hi, I have tried the rm ~/.zcompdump*; exec zsh, this works good in terminal, but in tmux, the problem still exists.

Just run exec zsh to solve this.

This worked fine for me

rm ~/.zcompdump*
exec zsh

It’s works for me.

I don’t know why it happens and I would love to know that. The .zcompdump file appears every time I run exec zsh. I’m guessing something in my .zshrc is causing it. To fix this I added

rm ~/.zcompdump*

to the end of my .zshrc.

rm ~/.zcompdump* exec zsh Thanks very much.

Anyone care to explain why this happens, and why removing ~/.zcompdump* fixes it?

@alex-bender after you deleted the dump, type zsh in your terminal. That should source the shell and should be fine. That worked for me.

rm .zconfump* ,after exec zsh ,the .zcondump* file recreate ,but fixed! thanks

rm ~/.zcondump* exec zsh

Yes!

rm ~/.zcondump* exec zsh

works for me.

I disabled the autojump plugin from my oh-my-zsh plugin list and it works fine now. I think there is a problem with the autojump plugin for oh-my-zsh.