Moving from Vundle to Vim-Plug

February 11, 2016

I’ve been using Vundle to manage my vim plugins for quite a while now, even blogged about auto installing Vundle on new machines.

Vundle is still great, but I’ve been hearing a lot about Vim-Plug, which aims to be better than Vundle.

I opened up the Vim-Plug Migration FAQ, and gave it a try.

My initial impression was, WOW, that’s fast, and much less clutter in my .vimrc.

No need for manual hacking around auto installing, it’s baked in.

Then I discovered about on demand loading of plugins, which is a neat feature that allows you to determine when to load vim-plugins. This made my day to day experience with vim even faster!

This simply is a killer feature:

Plug 'scrooloose/nerdtree', { 'on':  ['NERDTreeToggle', 'NERDTreeFind'] } "Loads only when opening NERDTree
Plug 'fatih/vim-go', { 'for' : ['go', 'markdown'] } "Loads only when editing golang files

There are also post install hooks:

Plug 'Valloric/YouCompleteMe', { 'do' : '~/.vim/plugged/YouCompleteMe/install.py --gocode-completer --tern-completer' }
Plug 'nsf/gocode', { 'rtp': 'vim', 'do': '~/.vim/plugged/gocode/vim/symlink.sh', 'for' : ['go', 'markdown'] }

EPIC!

See Github Diff for the actual migration, bare in mind that I took the opportunity to clean up my .vimrc, well a bit at least.