I had tried VIM in my college days but could not get hooked onto it and found it difficult to use. During my Master’s 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 quite some time. It is surely a great IDE for ROR. However, it has a large footprint on the memory.
Vim Ego –
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.
There is a blog by Yehuda Katz on Vim, which inspired me a lot. He interestingly mentioned using vim as you want. He OK’ed the use arrow keys instead of hjkl keys & to use a mouse. That helped to not loose productivity and very importantly kept me away from getting frustrated.
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), snippets 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.
- Vimtutor (This tutorial helps to learn basic commands)
- Configuration (i.e .vimrc, .gvimrc Actually I disabled the arrow keys & GUI related goodies from the second week and forced myself to use the hjkl keys.)
- Went through the Janus docs to learn more commands for different plug-ins (like NERDTree, NERDCommenter, Ack and etc )
- Practice, Practice, and Practice
The 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 status line, 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 the .gvimrc file.
set guioptions+=LlRrb set guioptions-=LlRrb set guioptions-=T
Add this line in your .gvimrc file to set the font.
set guifont=Menlo for Powerline 10
- Type vimtutor into a shell to go through a brief interactive tutorial inside VIM.
- Read the slides at VIM: Walking Without Crutches.
- Watch the screencasts at vimcasts.org
- Watch Derek Wyatt’s energetic tutorial videos at his site
- Read wycats’ perspective on learning Vim at Everyone who tried to convince me to use vim was wrong
- Read this and other answers to a question about vim at StackOverflow: Your problem with Vim is that you don’t grok vi
Follow me on Twitter