vim-plug: A simple, fast, and intuitive plugin manager

vim-plug logo

Vim setups can be very personal since there are so many configuration options available. While stock Vim can do much, it doesn't take very long to figure out that you need a plugin manager to quickly access a world of new functionality. Vim plugins can provide integrations, commands, syntax highlighting, and more. Check out VimAwesome to get an idea of what can be accomplished with plugins.

I have used Vundle for a few years and I know that many like pathogen. Both of these do a great job of including plugins in your Vim configuration. Being in the middle of updating my dotfiles repo, I ran into some issues managing git submodules for my plugins. This was really more of me forgetting how I had managed them in the past than any sort of issue with Vundle. The issue forced me to search around the web for best practices for managing Vim plugins on new computers and servers. While searching, I came across vim-plug.

What a great find vim-plug has been. Before I get into my personal findings about the project, it is worth reading "Writing my own Vim plugin manager", written by the Junegunn Choi, the creator of vim-plug. That article and the "Pros" section in the vim-plug repo documentation explain the need for this project. Another related article worth reading is "Vim plugins and startup time".

I am really enjoying vim-plug. The benefits I like the most are the ease of setup and use, very fast plugin installs thanks to parallel installations and updates, and support for plugins that reside on my local system.

Setup of Vundle and pathogen are also pretty simple, but I did notice that all the code for vim-plug is contained in one file. I love the accessibility to read and understand the code behind this plugin manager. I feel like I can fork and contribute to this project, where other plugins managers seem a bit more complicated.

I can't get over how fast plugins download and install. It feels blazing fast! I believe this is a result of the parallel installation functionality. While most of my plugins that installed very fast are dowloaded by vim-plug, I was also able to install Drupal Vim Plugin using Drush and have vim-plug install the plugin from my local system.

There are two features that I haven't used, but think I will benefit from soon. The first is the ability to checkout and install plugins using git branches, tags, and commits for projects hosted on Github. This is great if you need a particular version of a plugin. The second and maybe the best feature in vim-plug is the ability to load plugins on-demand. If you use lots of plugins, this creates a faster vim startup time. As my first attempt to use this functionality, I plan to configure markdown related plugins to only load when I open a markdown file.

Related to the original issue that had me searching for a fix for my Vundle setup, I have decided not to keep any plugins declared as git submodules. vim-plug allows me to request the exact versions I want using git branches, tags, and commits. When I install my dotfiles setup on a new computer, I just run script/bootstrap to install vim-plug and plugins.

I am really enjoying vim-plug and am looking forward to continuing the journey into its capabilities. If you give it a try, let me know what you think about it.

Blog Category: