My experience with Vim

vimlogo

I had tried VIM in my college days but could not get hooked onto it and found it difficult to use. During my Masters program, I tried almost all editors(Notepad++, Scite, E-text-editor and etc..). I was never into full featured IDE’s. Gedit was my first love in the editor list. I tried different plugins to make it powerful and had bumped into gmate which is a set of plugins and improvements to make Gedit a powerful programmer text editor. As I was still on a quest of finding the right IDE, I had come across blogs written on Vim. They inspired & lured me a quiet a lot but were never able to move me over to it.

I saw several developers using Netbeans, Textmate & RubyMine. I tried using those for a while and dated RubyMine for quiet some time. It is surely a great IDE for ROR. However, it has a large footprint on the memory.

Vim Ego -

vim1

One day I came across a quote from Obie Fernandez which said – “Everyone knows that the best programmers use Vim and Emacs”.

Then got me started into digging more on the Vim.

Inspiration -

vim2

There is a blog by Yehuda Katz on Vim, which inspired me a lot. He interestingly mentioned to use vim as you want. He OK’ed the use arrow keys instead of hjkl keys & to use mouse. That helped to not loose productivity and very importantly kept me away from getting frustrated.

Derek Wyatt’s videos on Vim also added sugar in my Vim inspiration. If you are new to Vim I recommend you to see ‘Welcome to Vim‘ from that series. That video is just awesome.

Janus Vim -
From Yehuda Katz I got to know about a new and very powerful way for Vim, which takes care of all my requirements for developing web applications in Ruby on Rails.
Janus is a Vim distribution of plug-ins and mappings for Vim, Gvim and MacVim. It has almost all required features/plug-ins while programming in Rails. It includes several plug-ins likes project drawer, ctrlp (Fuzzy file, buffer, mru and tag finder), snippest and etc.
Most people ask not to use Janus, as it’s complex, opinionated and makes you lazy. But for me it worked really well.

My steps with Vim -
Vim isn’t that hard, Two weeks are enough.

  1. Vimtutor (This tutorial helps to learn basic commands)
  2. Configuration (i.e .vimrc, .gvimrc Actually I disabled the arrow keys & GUI related goodies from the 2′d week and forced myself to use the hjkl keys.)
  3. Went through the Janus docs to learn more commands for different plug-ins (like NERDTree, NERDCommenter, Ack and etc )
  4. Practice, Practice and Practice

First week was really horrible, for every small code I had to see Vim commands before writing code. It surely hurt my productivity. But as we all know ‘it takes a while to get great powers’ and one needs to be patient. After two weeks, I was able to do everything that I needed.

MUST have Plug-ins -
If you want to master Vim you have to know your config file.

My Preferences -
I tried different kinds of color-schemes for Vim, but my choice is Molokai theme, you can get it from https://github.com/tomasr/molokai. If you want better-looking, more functional vim statuslines, then have a look on vim-powerline. It is pretty neat. Mostly I use GVim for my development, which has scrollbars and toolbar. When you creates multiple windows, you can avoid those scroll bars by adding these lines in .gvimrc file.

  set guioptions+=LlRrb
  set guioptions-=LlRrb
  set guioptions-=T

Last but not least, I use Menlo font for coding and It looks pretty neat for eyes even at smaller font sizes.
You can download it from here.

Add this line in your .gvimrc file to set font.

  
  set guifont=Menlo for Powerline 10

Tutorials -

 

Screen-shot -

my-vim-screenshot

  1. Brian Cardarella

    I’ve gone back and forth on how I approach Vim. Like yourself I started out in college and became quite proficient. But then I went Textmat for a long time and pretty much forgot all but the basic Vim commands. In the past two years I’ve been retraining myself, using Janus but I’ve come to realize that Janus is a crutch (despite my protests against those telling me this all along)

    Reply
  2. Kris

    This pretty much mirrors my own experience. I’ve been using vim for over a year now and I suspect I am much more productive. I’m trying to touch type now and the productivity drop from learning this practice is much greater than when I learnt Vim. I found the only way is to go cold turkey (arrow keys and mouse off / blank keyboard) once you have the basic concepts down.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

six + 16 =

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>