Is BundleInstall (for Vundle) required every time Vim is started?

2.2k views Asked by At

I'm using Vim/Cream on Win7 with the Vim binaries provided with Cream (v7.3.107), and have installed Vundle, and the plugins work fine after I run :BundleInstall. But after exiting and restarting, the plugins don't work until I run BundleInstall again. Is this normal? I thought BundleInstall was a one-time command (excepting when used for updates). Here's an excerpt of what I have in my vimrc (actually cream-user.vim, which is what Cream prefers):

set nocompatible
filetype off
set runtimepath+=$HOME/vimfiles/bundle/vundle/
call vundle#rc()

Bundle 'gmarik/vundle'

" Your bundles go here:
"
" ORIGINAL REPOS ON GITHUB
Bundle '907th/vim-auto-save'

.

However, when I run :AutoSaveToggle (a vim-auto-save command), I get the following error:

E492: Not an editor command: AutoSaveToggle

.

The cream-user.vim file is being invoked (it's listed in scriptnames):

83: C:\Users\<MyUserName>\.cream\cream-user.vim
[...]
85: C:\Users\<MyUserName>\.vim\bundle\vundle\autoload\vundle.vim
86: C:\Users\<MyUserName>\.vim\bundle\vundle\autoload\vundle\config.vim

.

...and Vundle itself is installed, as its commands work, notably :BundleList, which lists vim-auto-save among the installed bundles:

" My Bundles
Bundle 'gmarik/vundle'
Bundle '907th/vim-auto-save'

After I re-run BundleInstall, the plugins start working, and I do notice scriptnames now includes the extra files:

125: C:\Users\<MyUserName>\.vim\bundle\vundle\autoload\vundle\installer.vim
126: C:\Users\<MyUserName>\.vim\bundle\vundle\autoload\vundle\scripts.vim
127: C:\Users\<MyUserName>\.vim\bundle\vim-auto-save\plugin\AutoSave.vim

Putting :BundleInstall in the .vimrc doesn't look like the right move either, as it opens a buffer (can be worked around, but still...). I'm a brand new to Vim so I'm not sure what's wrong, probably something simple on my end, like my not being clear on how to appropriately invoke vundle. Any ideas on how to fix this?

3

There are 3 answers

1
Ingo Karkat On BEST ANSWER

First: You're right, :BundleInstall is not required on every launch. I guess the behavior you're seeing has to do with the Cream customizations; it probably messes with 'runtimepath' itself, and therefore interferes with Vundle.

If you just chose Cream for an easy install of Vim (though your 7.3.107 is quite dated already), there's also a "Vim-only" installer. Also, a Vim 7.4 installer is available from http://www.vim.org/download.php.

In case you do want Cream (wouldn't recommend that; especially if you're into programming / customizing Vim with plugins), I'd open an issue with the Vundle project, asking for help / support of Cream.

0
Greg Lund On

I had a similar problem with MacVim. The problem for me was that I didn't follow the instructions closely enough. I just assumed that I could just put the Vundle lines in my .gvimrc. This was WRONG! The solution, as per the instructions, was to place the lines in the .vimrc file. The order of operations matters, and it's possible this matters for Cream.

0
hackel On

I found a solution to this problem in this bug report: https://github.com/gmarik/Vundle.vim/issues/430

At the end of your cream-user.vim file, add:

call vundle#config#require(g:bundles)

This causes the plugins to be loaded without showing the Vundle\Installer buffer at startup.