My Essential List of VIM PluginsJanuary 9th, 2015 by
When I switched to VIM in mid 2014, I started out by learning the modes (visual, normal, insert, replace), the unusual cursor movements, and text manipulation shortcuts. Once I had those basic things going, I started looking at how other developers where using the editor, and how they integrated it into their workflows. So I became a addicted to finding plugins that did the kind of magic that would increase my productivity, make me type less, and achieve interesting things. The following list of plugins I have compiled is a good place to start if you’re transitioning from another editor and want to get all the basics going. Also, you’ll notice that some of the plugins are meant for front-end developers. But still, most of these achieve pretty common tasks that anyone could use, so I’m sure you’ll find something valuable here.
Easily comment your code in different styles, like, per line, per block, end of line, etc.
Having autocompletion is a must, this plugin gives you keyword completion using a quick fuzzy search mechanism. Before this one I was using NeoComplete, but it turned out to perform slower when I had many buffers open.
Probably one of the most popular plugins for VIM, and very essential. NerdTree sets you up with a file explorer side panel with file manipulation options to create, rename, copy files and all your VIM cursor positioning capabilities.
VIM by default doesn’t treat tabs like other popular editors, and if you hate the fact that NERDTree out of the box creates an instance of the file explorer per file you open, you have to install this. This plugin creates one instance of NERDTree globally, so you can switch between tabs, and the same file explorer will always be there, like a sane editor. Also gives reasonable filenames to the tabs, not like nerdtree_1, nerdtree_2, etc.
Ack VIM I love ack, it’s the same as the command line version but inside VIM. It basically lets you search for any string inside any file in any folder from the current root directory.
This one is basically Ack applied to NERDTree file explorer. Adds an additional option in the operation menu that looks like: ‘(s)search directory’
Many features to align your code, I specifically use it to align key value objects and variable definitions, something like
Gives you a temporary buffer window where you can type code for later use or try things, like a scratchpad. The difference to opening a regular window is that this one automatically closes when you leave the window (tab away).
Selecting text inside a tag can be as easy as “vit” in VIM, but say you want to incrementally select inside any delimiter (words, parenthesis, double quotes, etc) from the current cursor position incrementally expanding out.
Super easy file Opening/Switching in VIM. It’s actually a desktop application that integrates with MacVim, which is what I use. If you’re using command line VIM I’d suggest looking into this plugin:
This is one of my favorites plugins, it integrates GIT very smoothly to perform commands without leaving the editor. Stage, commit, blame, push right from the editor’s command line. For ex:
:Gread Will stage the current open file https://github.com/tpope/vim-fugitive
This one shows whether a part of the code has been GIT added, modified or deleted. Shows a plus or minus sign on the left (line number) column.
Surround wraps your code with anything you want from tags, quotes, brackets, etc. It’s super handy, might take you a bit to get used to and remember the shortcuts, but once you do you will love it.
This is a popular one for most editors. Emmet formerly known as ZenCoding expands abbreviations to create blocks of code that will save you tons of time when writing markup and css.
Status information is always cool, this is what vim-airline does. It gives you a bar in the bottom of the screen that displays a bunch of information about your file. Vim mode, file path, GIT branch, Linting status!, cursor position, etc.
Keeping my hands working inside the keyboard area or not using a mouse that much is one of the reasons I switched to this editor. You’ll find vim-sneak to be a great way to jump around the page by searching by initial characters and jumping to the next matches continuously. By the way
vim-easymotion does a similar thing where you can highlight parts of the page and narrow down your cursor position. I personally liked vim-sneak because its very light. https://github.com/justinmk/vim-sneak
Lets you generate JsDoc style comments on your code by reading your function’s name, arguments and return values
Marks all white spaces as red including tabs and also has the option to clean them up painlessly
Enables VIM to check for syntax errors for a ton of languages. You can enable this to check while typing or when you save the file.