vim +PluginInstall +qall will install the plugins and exit, but the process opens the normal vim UI and gives feedback in that UI. Is there a way to have each installation printed to stdout, so as to make an automated installation workflow sane? Currently i'm just muting Vim, which is less than optimal. Thoughts?
A had a look at the code base of Vundle once because I thought about refactoring it (some PRs are still waiting). I found that the code for updating is very tightly integrated with the code for the interface. So I think there is no other possibility at the moment.
I really want to be able to PluginInstall without the interactive interface.
Because of the requirement on a TTY, you cannot run PluginInstall from a Puppet manifest or a Dockerfile.
@gmarik Any ideas on this?
This would be awesome, but a bit hairy to implement, considering the aforementioned tight integration between interface and install logic :(
For myself, to speed up the first install, I ended up writing a simple script that reads the bundles and clones them in parallel, but I still open Vim to load the vimrc and get the bundle list. I had to do this because I was including extra files with Plugin lines conditionally.
So in any case, maybe Vundle is not really the tool for this kind of scenario, is what I'm saying. If your vimrc is a simple one, then you could potentially parse it to get the plugins and just clone them in place, so when Vim loads with Vundle, they will be loaded.
@jdevera do you mind having a look at some of my old PRs (#450 and #468 for example). I did start some work to remove the tight connection between interface and logic at that time but never went any further with it because you stopped merging things.
So sorry I let you down @lucc, my focus on Vundle is really intermittent.
Seems to me that a simple vim +PluginInstall +qall &>/dev/null would work in many cases. YMMV
@mafrosis The problem has to do with TTY. I ran into a problem where Docker wasn't allocating a TTY during it's image compilation phase (e.g. docker build). However, I believe this is fixed in Docker. Although it would still be nice to decouple the UI from the logic.
Ah I see. I'm not familiar with docker yet (haven't joined the cool gang!)
If you are in _terrible_ need you can implement it yourself or use a short shell script. Something like this might do the trick:
for dir in ~/.vim/bundle/*; do
git -C "$dir" pull # maybe add ">/dev/null 2>&1" and/or "&" here
done
I managed to get it going this way:
echo | echo | vim +PluginInstall +qall &>/dev/null
The 2 echo's send newline's to any confirmation prompts that might come up, then i pipe the output to /dev/null - not pretty but it works.
@breerly what plugins require confirmation?
theoretically @lucc suggestion should work as well, though i have not tested
@razic I think it was YCM warning... don't remember
I wrote this a while ago, might help:
@breerly excellent!!!!!
@unhashable's answer worked for me but with single echo!
echo | vim +PluginInstall +qall
Also, got rid of the dev null as I want to see the output.
Most helpful comment
I managed to get it going this way:
The 2 echo's send newline's to any confirmation prompts that might come up, then i pipe the output to
/dev/null- not pretty but it works.