When I try to autocomplete files (with vim as argument 0):

vim ~/.conf <TAB>

It shows:

_arguments:450: _vim_files: function definition file not found
_arguments:450: _vim_files: function definition file not found
_arguments:450: _vim_files: function definition file not found

It was working fine before!

Other commands:

cat ~/.conf <TAB>


cat ~/.config/

Why is zsh failing only at vim?

  • Does it happen under zsh -f and then autoload -U compinit && compinit ? – thrig May 2 '16 at 16:55
  • No, it's fine then – UniversallyUniqueID May 2 '16 at 16:57
  • It's working even after a source .zshrc. – UniversallyUniqueID May 2 '16 at 17:03
  • 1
    Okay, you get to bisect your zsh configuration to figure out what's breaking it. Removing dreck like oh-my-zsh may help. – thrig May 2 '16 at 17:04
  • 1
    Yet another "broken by OMZ" question... – jasonwryan May 2 '16 at 18:10

Turns out that removing all ~/.zcompdump files solved it:

rm -r ~/.zcompdump*

This works for me :

rm $ZSH_COMPDUMP && exec zsh

  • This is the correct answer. The "accepted" answer will sometimes also work, but this is the most correct answer. Works every time. :) – Metagrapher Jan 27 '18 at 13:55

None of these would work for me. My problem was antigen:

rm ~/.antigen/.zcomp*

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.