Loving the vimtutor

A couple of times recently i’ve found myself doing <ESC>:wq in the internet instead of pressing the submit button. I don’t use Vim very much at the moment – really only to make Git commits – but i’ve had enough of a taste that i feel it’s something i want to learn properly.

For a few months i’ve been searching for a text editor that i can use both on the Mac at work, and Linux on my netbook and PC at home. TextMate is a wonderful thing, but there is no decent Linux equivalent. A colleague and i started writing OpenMate – an open source cross platform equivalent to TextMate … but it’s hard! I enjoy gedit but failed to get gedit installed at work. I’ve tried NetBeans and jEdit but didn’t like them much, and they feel too big and clunky for a netbook.

After a little bit of reading about Vim i have become very excited. More excited that i’ve ever felt about a text editor before! I’ve realised that my conception of Vim has been wrong. I used to press i straight away to get into Insert mode, and stay there until i wanted to perform a command, in which case i’d press <ESC> followed by the command. Now i realise that a better way to use it is to be in ‘Normal’ mode most of the time, press i to enter Insert mode very briefly, and press <ESC> as soon as i’ve finished inserting.

This afternoon i discovered vimtutor and have been really enjoying it! You can run it on any Unix/Linux based system; just type vimtutor at the command line. It takes you through every command, at your own pace. It gives you samples of text to correct, using the commands you have just learnt. It’s actually quite fun and demonstrates the power of Vim very effectively!

At the moment i’m still muttering everything as i go, like “delete … 3 … words” as i very slowly type d3w and i’m exclaiming in delight at almost everything i learn – like – “Wow! That’s so clever!” I’m sure soon enough i’ll be able to use it effectively without making a lot of noise about it!

It is interesting learning it for Dvorak, but not too difficult. The up and down keys are in my left hand, and the left and right keys are in my right hand. They all actually fit rather neatly under my hands and feel intuitive even though they are not all in a line together. To be honest, i think i probably prefer it to the way it works under Qwerty.

Here is a helpful Vim cheatsheet laid out for Dvorak. Thanks, Mark Schoonover!
Here is an excellent article about the wonders of Vi/Vim.

It’s ridiculous how exciting this feels to me! Perhaps it’s the sense of moving up another level in the geek hierarchy! :D

Advertisements

15 comments on “Loving the vimtutor

  1. Aha yeh! I think learning Dvorak was a very good thing which has served me well over many years. Learning Vim may well be another!

    I watched your sample tutorial about Emacs but was just blown away by the key combinations. I think i’ll prefer Vim where you mainly just press one key at a time but combine them together for most maximum effect! :)

  2. I switched to vim about a week and a half ago. The more I learn about it, the more I find that it has a reasonable way of doing most anything. I’m no longer afraid of it, like I became the last couple of times I tried to switch.

    I suggest picking it up again later each time you get frustrated with it. After 10 times or so I think you’ll find you like it enough to keep using it, even if it doesn’t do everything TextMate does. Don’t believe the “use one editor well” tripe!

  3. Oh that is interesting, and good insight, thanks!

    The times i’ve used Vi/Vim in the past, i’ve been really uncomfortable with it and wanting to get out of it as soon as possible! It’s only since using it several times a day for one-line Git commit messages that i’ve proved to myself that it isn’t so scary.

    I’m pleased to hear someone else is using Vim. At a time where it seems that so many rails developers are switching to Emacs, i thought i might be shot down in flames!

  4. Ah, thanks for that! I don’t think i’ll bother because i know Dvorak so well, it would be weird to switch to Qwerty for commands. But i’m glad to hear that such an option is available. Thanks!

  5. I never had my hands going on vim as well. I always used Pico which is now Nano (open source text editor) maybe because I never had so long codes to deal with and only a few handful of configurations file to work with. I've got confused always with how to save work on Vim. But I will give vimtutor a try soon as soon as I logon to my linux. Thanks for telling about vimtutor.

  6. One of the greatest fears in my mind before switching to Dvorak was remapping my fine-tuned keybindings. However, modifying some of those proved invaluable to me. I'm glad I did switch.

  7. One of the greatest fears in my mind before switching to Dvorak was remapping my fine-tuned keybindings. However, modifying some of those proved invaluable to me. I'm glad I did switch.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s