# My Vim Setup

## April 19, 2016 VimDevelopmentSetup

As I switched Sublime Text for Vim a long time ago I felt an update of my setup is overdue. Sublime Text was really, slow to say the least, I always had to wait almost half a minute after opening it before I could dive head first into my code. The occasional crashes and the fact that it is propritary and maintained by only one guy did the rest.

A few years ago I actually used emacs before I switched to mac. But I used Vim in the command line already and just felt more comfortable with it. The movements and everything feel more natural than using Ctrl + x, Ctrl + y for everything. This boils down to personal preference anyway. Emacs is a great editor, but right now I prefer Vim.

When you come from a full blown editor like Sublime Text Vim is pretty archaic at first. But it is in use by the community for over twenty years now and development continues.

## The Package Manager

Just like with Sublime Text the first thing I advise is using a package manager. It helps you get plugins and themes and such in no time. You can even choose among a number of package managers.

• Dein: Git based
• Neo Bundle: Fork of Vundle
• Pathogen: Just clone the plugin to ~/.vim/plugin/ and it just works
• Vim-plug: Needs either Neovim or Ruby/Python runtime
• Vundle: List the plugin in your .vimrc and it works automagically

So Vim package management comes in a ton of (slightly) different flavors. I opted for the most simple one, Pathogen. I mostly just browse the GitHub website of the plugins anyway, and cloning the repository is easier than to edit a file or something. But this, again, is simply personal preference.

## Some Important Plugins

There are near infinite plugins out there for Vim so I’ll just list my most important ones.

This picture shows the state of MacVim on start up. On the right there is NERDTree which gives me a handy file browser. The left window is Startify which lists my bookmarks, recently edited files (globally and in the current directory). Almost invisible, yet it is there, the bottom shows Airline which can be seen better in the next screenshot. The top shows a list of files as provided by Bufferlist (yeah, so no tabs but buffers). I switch between them with ctrl+x (:bprev) and ctrl+y (:bnext).

As mentioned before, the bottom now displays a fully packed Airline. The left shows the vim mode I’m in (like normal, visual and insert), followed by the git changes (added lines, new lines, deleted lines) a small overview of the files (yes, redundant), the file format, the new lines (unix/microsoft (yuck)). The right side shows a simple overview of my position in the file like percentage of position, line number and char number. Really handy, really simple. The red bar on the left is provided by GitGutter and shows my changes with respect to the local ^HEAD.

Besides the visual things I have some other quite important plugins I use:

For a full list of my vim packages check GitHub. If you like some of my features or themes I use, be sure to check my .vimrc here (lots of neat stuff in there).