Wednesday 14 January 2015

Getting Started with VIM

Vim is an awesome text editor, oh wait it's just much more than a text editor.
Before i begin this post doesn't not include commands and all but just an advice as to how to approach learning Vim.

VIM as such provides just bare minimum functionality and is not so cool, but again it's upto you to configure  Vim according to you and make it cool. Vim also supports tons of plugins that bring along a lot more functionality than just simple Vim.

What not do do...

One of the biggest mistake one can make while starting with Vim is to approach it just like other text editors like sublime, Gedit etc and it is because Vim is different is that is why it's awesome.

Vim is a modal editor which means it has different modes and a key may take special role according to the mode.

Also in Vim you simply do everything from Keyboard so say Goodbye to you mouse. Everything you do in vim is doable by not moving your fingers from the home row, yes exactly you don't even need arrow keys because moving is done using h,j,k,l keys and this is the main reason behind increase in productivity as you are not wasting time moving you hand back and forth between your mouse/arrow keys. 

How to begin ?


Vim stores the configuration in a file called .vimrc (also know as a dot file, literally because of the dot) present in your home directory. This simply text file dictates what will the behavior of Vim when launched.  Initially you should use somebody else's dot files and once you get your hands on and have fair bit experience you can start to tweak the configuration according to your needs.

Initially if you want you can use my vim setup: https://github.com/harsimrans/dotvim

Also initially you should not make Vim as your primary text editor because if you do so you'll hate Vim, like from the bottom of your heart. your productivity will drop not because vim is complicated but because you are just not used to it. So take out some free time and start playing around with Vim and probably after a few days you'll feel comfortable.

Browse through the Internet, there are tons of articles about basic Vim commands and go through a couple of them before you start using Vim.

REMEMBER invest some time in Vim , play with it and get comfortable with Vim. Then make Vim your primary editor. Believe me you will realize your productivity increase than before even if it's little.

Productivity after vim  = c * productivity before vim, where Obviously c >> 1 :P

No comments:

Post a Comment