Skip to content

Instantly share code, notes, and snippets.

@dylanbr
Created November 9, 2018 09:12
Show Gist options
  • Save dylanbr/7d5747beb4e0ec6e00cd3eaabd3e8831 to your computer and use it in GitHub Desktop.
Save dylanbr/7d5747beb4e0ec6e00cd3eaabd3e8831 to your computer and use it in GitHub Desktop.
Plugin manager manager for Vim
" Initialise plugins {{{
set nocompatible
" Install your preferred manager
" vundle: git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
" vim-plug: curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
" minpac: git clone https://github.com/k-takata/minpac.git ~/.vim/pack/minpac/opt/minpac
"
" Install/update/clean your packages
" vundle :PluginInstall / :PluginUpdate / :PluginClean
" vim-plug :PlugInstall / :PlugUpdate / :PlugClean
" minpac :call minpac#update() / :call minpac#clean()
let manager = "vundle"
let packages = [
\"tpope/vim-sensible",
\"tpope/vim-fugitive",
\"bling/vim-airline",
\"kien/ctrlp.vim"
\]
if manager == "vundle"
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
for package in packages
Plugin package
endfor
call vundle#end() " required
filetype plugin indent on " required
elseif manager == "plug"
call plug#begin('~/.vim/bundle')
for package in packages
Plug package
endfor
call plug#end()
elseif manager == "minpac"
packadd minpac
call minpac#init()
" minpac must have {'type': 'opt'} so that it can be loaded with `packadd`.
call minpac#add('k-takata/minpac', {'type': 'opt'})
for package in packages
call minpac#add(package)
endfor
endif
" }}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment