Skip to content

March 3, 2010

1

VIM Crash Course

MacVim icon, glossy style
Image via Wikipedia

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.

Reblog this post [with Zemanta]

No related posts.

1 Comment Post a comment
  1. Scott
    Mar 3 2010

    I suggest ftp://ftp.vim.org/pub/vim/doc/book/vimbook-OPL.pdf and http://www.swaroopch.com/notes/Vim as good tutorials that go into much more detail than the vimtutor or any cheat sheet can supply. The best thing to do is to spend about an hour a day reading and practicing for about two weeks. Don’t try to rely solely on Vim during this time. Just practice. It will be the best 14 hour investment of your time you are likely to spend learning a new skill. By the end of it, you will be at least as productive in Vim as in your current editor, and everything you learn after that will make you more productive than you CAN be in your current editor. The investment of time will repay itself many times over.

    Reply

Share your thoughts, post a comment.

(required)
(required)

Note: HTML is allowed. Your email address will never be published.

Subscribe to comments