Search code examples
vimvim-fugitive

"Unknown function: <SNR>37_repo_dir" when opening a new file in vim


I recently updated oh-my-zsh, vim and ran rcup to update dotfiles and vim plugins.

When opening a new file in vim I get an error, part of which contains:

Unknown function: <SNR>37_repo_dir

This seems to be related to the fugitive plugin that I have installed as it is mentioned above the error.


Solution

  • The vim syntax in one of the previously existing fugitive.vim configuration files is invalid for in the latest version of vim. fugitive.vim was removed from the latest version of thoughtbot/dotfiles. Since rcup only replaces files dotfiles and doesn't delete them if they were removed from the dotfiles folder the fugitive.vim file needs to be manually removed.

    The most straightforward thing to do is:

    rm -rf ~/.vim && rcup