My VIM Setup
For the past five years or so, I’ve been using a combination of vim and GNU screen to serve as my command line IDE. I use relatively few plugins and try to keep my VIM environment as simple as possible. Here are the plugins in my vim setup that I really like:
Sessionman.vim is a VIM session manager, meaning it will save your open buffers to a file for easy re-opening. It’s useful in cases when you’ve been working on a ticket and you need to have one set of files open and then need to switch to another ticket that requires another set of files to be open. Saving your sessions is as easy as
:SessionSave SessionName you can see a list of your open sessions with
:SessionList. It’s very handy.
NERDTree is the classic vim file explorer. When working on a new project, this plugin is invaluable for seeing what’s actually in all the directories of the project in a tree-type view. I keep this line:
in my .vimrc to automatically open NERDTree to my current directory if I run vim from the command line without any arguments.
In a similar navigating-the-filesystem vein as NERDTree, I use LycosaExplorer to search the filesystem and explore my open buffers. It’s a python port of LustyExplorer and the commands are virtually the same. (Protip, the default vim command key is
Often times I’m browsing a project and find a line of code that puzzles me and I want to see who wrote it and why. With Fugitive, I can call
:GitBlame and shame! It’s a seriously helpful tool if you’ve inherited a project and want to match architectural decisions back to commits back to tickets.
vim-rest-console is somewhat handy for doing simple work with REST apis. Simply open a new buffer and set the filetype to REST
:set ft=rest, specify a host, and send your POST, GETs, PUTs, and DELETEs. However, I’ve found it’s difficult to work with large chunks of JSON (such as those required by the Elasticsearch DSL) and it’s easier to manipulate those with a python script.
That’s my vim setup! Let me know if I’m missing anything in the comments.