-
-
Save klaernie/db37962e955c82254fed to your computer and use it in GitHub Desktop.
vimrc-fu to bootstrap vundle. This code will bootstrap vundle and run PluginInstall when vundle is missing. It is non-interactive thanks to a healthy sprinkling of :silent, and assumes that Git is installed. This version is also aware that it initial run might be under vcsh, so it unsets $GIT_DIR before cloning vundle.
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
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
let s:bootstrap = 0 | |
try | |
call vundle#begin() | |
catch /E117:/ | |
let s:bootstrap = 1 | |
silent !mkdir -p ~/.vim/bundle | |
silent !unset GIT_DIR && git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim | |
redraw! | |
call vundle#begin() | |
endtry | |
" let Vundle manage Vundle, required | |
Plugin 'VundleVim/Vundle.vim' | |
" ... other plugins | |
" All of your Plugins must be added before the following line | |
call vundle#end() " required | |
if s:bootstrap | |
silent PluginInstall | |
quit | |
end | |
filetype plugin indent on " required |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment