Skip to content

Instantly share code, notes, and snippets.

@frasertweedale
Created January 5, 2014 08:35
Show Gist options
  • Save frasertweedale/8265874 to your computer and use it in GitHub Desktop.
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.
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
@klaernie
Copy link

klaernie commented Feb 1, 2016

I built an updated version that uses the new PluginInstall and vundle#begin() API, and also supports being run from inside a vcsh environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment