Vim-plug: vim-go post-update hook error

Created on 11 Feb 2017  路  4Comments  路  Source: junegunn/vim-plug

There is my config:

Plug 'fatih/vim-go', { 'do': ':GoInstallBinaries' }

If vim does not open a .go file, PlugUpdate will cause an error:

Post-update hook for vim-go ... Vim(let):E117: Unknown function: go#path#BinPath

macOS
latest version of vim-plug

open vim with `mvim -v` in terminal
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Feb 10 2017 10:29:31)
MacOS X (unix) version
Included patches: 1-297
Compiled by Homebrew
bug

Most helpful comment

Oh, you have for option. vim-plug does load files in plugin directory when a :VimCommand is invoked on post-update, but it does not add the plugin to &rtp so it fails to find the function.

I'll fix the problem, but please keep in mind that I generally don't recommend using for option for file type-specific plugins like vim-go.

All 4 comments

I have the same line on my vimrc (https://github.com/junegunn/dotfiles/blob/2ec0d6e/vimrc#L107) but I can't reproduce the problem you describe. Can you show your entire vim configuration?

Oh, you have for option. vim-plug does load files in plugin directory when a :VimCommand is invoked on post-update, but it does not add the plugin to &rtp so it fails to find the function.

I'll fix the problem, but please keep in mind that I generally don't recommend using for option for file type-specific plugins like vim-go.

Thanks

Was this page helpful?
0 / 5 - 0 ratings