This is my Vim config

I like Vim a lot, because it’s lightweight and versatile. If you’re used to Vim it is the fastest code editor there is. If you’re not used to Vim, it’ll probably cause you a migraine.

I started using Linux on and off since 1999 (yeah.. I’m old), so Vim is in my system and I probably developed some Vim DNA as well. I’m prejudiced.
Lately a lot of new text editors became available (Sublime, Atom, Brackets). I tried them and used them, but always get back to Vim.

The config

This is how my Vim looks like.
I have a minimal config with NERDTree for file browsing and text indenting.

2014-06-07_14-14-44

This is how:

  • Install Vim.
  • Install Pathogen. Pathogen makes it easy to install plugins for Vim.
  • Create a vimrc
  • Install NERDTree

Install Vim

Vim is already is installed if you have a Mac. On Debian based Linux distro’s it is a simple apt-get install vim. On Windows I guess you would need to install GVim but I’m not sure if everything works as expected.

Install Pathogen

Next install Pathogen. Check this. Basically you have to create 2 folders (~/.vim/autoload and ~/.vim/bundle) and then you need to install pathogen in ~/.vim/autoload. Like so:

Then go ahead and create a ~/.vimrc file, for your configuration:

Edit the .vimrc

This is my .vimrc:

The first line configures the status line. Until line .. is pretty self explanatory.
Line 10 enables pathogen
Line 11 enables line indenting
Line 13 maps the F7 key to indent the whole page

NERDTree

The last section configures NERDTree.
Install NERDTRee by downloading it in ~/.vim/bundle (the Pathogen way)

In my .vimrc I start NERDTree automatically if I start Vim with a file. If I start Vim without arguments, NERDTree is not loaded. I can start NERDTree by executing :NERDTRee in Vim execution mode.

So, that was my Vim config. Until next time!