VIM Crash Course

Most developers know the basics of VIM, enough to edit a conf file, but most stay there, unaware of the power and beauty of vim. One of my developers has expressed desire to abandon the bloated GUI ways of eclipse and discover VIM. I have been using VIM for such a long time I forgot how difficult that transition is. Here are some resources and approaches to help you learn vim.

The easiest place to start is by using a tutor. Did you know that Vim”) comes with it’s own tutor? Simply type vimtutor in your shell (outside of vim). If you prefer the gui version, type gvimtutor. On MS-Windows you can find it in the Program/Vim menu. The tutor is a 30 minute interactive tutorial that will walk you through the basics of editing with vim. Once you have completed the tutor it’s critical that you understand how to move around (the tutor covers these).

Practice Practice Practice.

h j k l  …  e b w f t * / ? % $ ^

These are your bread and butter and most everything that follows builds on these. Vim also comes with a very comprehensive user manual. Launch vim and type “:help user-manual” (without quotes) in command mode.

Most important is that the first couple days trying to use vim instead of a gui based editor will be frustrating and hard. Stick with it. Within a week or two you things with flip on you and you will begin to be frustrated that every program doesn’t work like vim, and be shocked how often you go to the mouse or arrow keys.