Created
January 5, 2014 08:35
-
-
Save frasertweedale/8265874 to your computer and use it in GitHub Desktop.
vimrc-fu to bootstrap vundle This code will bootstrap vundle and run BundleInstall when vundle
is missing. It is non-interactive thanks to a healthy sprinkling of
:silent, and assumes that Git is installed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
filetype off | |
set rtp+=~/.vim/bundle/vundle/ | |
let s:bootstrap = 0 | |
try | |
call vundle#rc() | |
catch /E117:/ | |
let s:bootstrap = 1 | |
silent !mkdir -p ~/.vim/bundle | |
silent !git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle | |
redraw! | |
call vundle#rc() | |
endtry | |
Bundle 'gmarik/vundle' | |
" ... other plugins | |
if s:bootstrap | |
silent BundleInstall | |
quit | |
end | |
filetype plugin indent on |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I built an updated version that uses the new
PluginInstall
andvundle#begin()
API, and also supports being run from inside a vcsh environment.