[vim-plug](https://github.com/junegunn/vim-plug) has a number of advantages over Vundle: * Installs and updates plugins very quickly in parallel * Can lock plugins at versions/tags * Can rollbacks updates (useful if a plugin breaks) and take/reload snapshots of current state * Optionally lazily-load plugins when their relevant command is invoked * Execute post-update hooks for plugins with compiled extensions, etc. vim-plug uses a DSL very close to Vundle (simplest form is `Plug` vs. `Plugin`), and here it is set to continue to use the same plugin location that Vundle was using before. After updating, users will need to 1. Rename `Plugin` lines in `.vimrc.bundles.local` to use `Plug` 2. Run `:PlugInstall` (the post-up hook does this)
52 lines
1.3 KiB
Text
52 lines
1.3 KiB
Text
if &compatible
|
|
set nocompatible
|
|
end
|
|
|
|
" Shim command and function to allow migration from Vundle to vim-plug.
|
|
function! PluginToPlug(arg, ...)
|
|
echom "You are using Vundle's `Plugin` command to declare plugins. Dotfiles now uses vim-plug for plugin mangagement. Please rename uses of `Plugin` to `Plug`. Plugin was '".a:arg."'."
|
|
let vim_plug_options = {}
|
|
|
|
if a:0 > 0
|
|
if has_key(a:1, 'name')
|
|
let name = a:1.name
|
|
let vim_plug_options.dir = "$HOME/.vim/bundle/".a:1.name
|
|
endif
|
|
|
|
if has_key(a:1, 'rtp')
|
|
let vim_plug_options.rtp = a:1.rtp
|
|
endif
|
|
endif
|
|
|
|
Plug a:arg, vim_plug_options
|
|
endfunction
|
|
|
|
com! -nargs=+ -bar Plugin call PluginToPlug(<args>)
|
|
|
|
call plug#begin('~/.vim/bundle')
|
|
|
|
" Define bundles via Github repos
|
|
Plug 'christoomey/vim-run-interactive'
|
|
Plug 'kchmck/vim-coffee-script'
|
|
Plug 'ctrlpvim/ctrlp.vim'
|
|
Plug 'pbrisbin/vim-mkdir'
|
|
Plug 'scrooloose/syntastic'
|
|
Plug 'slim-template/vim-slim'
|
|
Plug 'thoughtbot/vim-rspec'
|
|
Plug 'tpope/vim-bundler'
|
|
Plug 'tpope/vim-endwise'
|
|
Plug 'tpope/vim-eunuch'
|
|
Plug 'tpope/vim-fugitive'
|
|
Plug 'tpope/vim-rails'
|
|
Plug 'tpope/vim-repeat'
|
|
Plug 'tpope/vim-surround'
|
|
Plug 'vim-ruby/vim-ruby'
|
|
Plug 'vim-scripts/ctags.vim'
|
|
Plug 'vim-scripts/matchit.zip'
|
|
Plug 'vim-scripts/tComment'
|
|
|
|
if filereadable(expand("~/.vimrc.bundles.local"))
|
|
source ~/.vimrc.bundles.local
|
|
endif
|
|
|
|
call plug#end()
|