4

I have a installation script that I use to initalize my vim plugins when I'm on a new machine

#!/bin/bash

# Clone vundle into the directory if it's not already
if [[ ! -e bundle/vundle/.git ]]
then
    mkdir -p bundle
    rm -rf bundle/vundle
    git clone https://github.com/gmarik/vundle.git bundle/vundle
fi

vim +BundleInstall +qall

However, this brings up vim. I was curious if there was a way to have vim hide its interface but still execute the BundleInstall script?

In other words the script would hang until the BundleInstall command finished.

3

Turns out this was actually embarrassingly simple, not sure why I didn't try this in the first place.

vim +BundleInstall +qall 2&> /dev/null
0

Vim is an interactive editor; the best you can try is silent batch mode:

vim -es <<<BundleInstall

See :help -s-ex for details.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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