Thursday, November 8, 2012

Vim Motions

One of the more frequent admonishments delivered on #vim to the whining novice or the curious journeyman is to master the many motions within the editor. Previously, a bewildering list of punctuation and jumbled letters was unceremoniously dumped on the complainant with the misguided expectation that they'd then take themselves off and get right to the task of memorising the eighty odd glyphs. We mistook their silence for compliance but I rather suspect it was more bewilderment or repulsion or sheer paralysis. In an attempt to friendly that mess up, I have started an infographic series intended to cover the twelve major categories, probably spread over six separate infographics.

The Vim Motions Infographic Series (in 9 parts):

1. Line & Buffer
2. Column
3. Word
4. Find
5. Search
6. Large Objects
7. Marks, Matches & Folds
8. Text Objects (not motions, but mesh nicely at this point)
9. Creating your own Text Objects

I plan to have a different expression on the chibi's face in each of the pages. I'll move the crying one from the Large Object page (as shown below) to page 1 and then progressively improve her mood through the remaining pages: something like -- crying, disappointment, resignation, hope, amazement, happiness, confidence, smugness and something devilish. As an update on that, I have inked five of the chibis now. I look forward to having them all up in their own infographics.

I decided to have the background colour change to suit the mood of the chibi, starting from black in image number one to represent depression and despair. I will roughly follow the same colour spread I used on the How Do I Feel graphic.

I have no experience in putting together a multi-page piece like this. Feedback certainly welcome. I was vaguely thinking of having it a bit like a magazine or comic book spread, but I don't know how to do that or whether it's the right or even a good approach.

Green indicates cursor origin before issuing the motion.
Red indicates cursor destination at the end of the motion.
Orange shows the area covered by the motion. This would be the same area highlighted in Vim if a visual operator was used with these motions.

1. Line & Buffer Motions

2. Column Motions

6. Large Object Motions


  1. Thanks Barry, this is super useful.

    I think it would have been better if instead of using light and dark variation of blue color you had used different colours like green or yellow. The legend would have been much more clearer then. If you feel like I am willing to make the change.

    Anyway, great job in illustrating Vim navigation commands. Keep it up!

    1. Thanks, Talha.

      I am happy to change the colours to make it clearer. I feel that blue and green together might be a bit gaudy though. I will experiment -- and I'm happy to hear (or better yet, see) suggestions.

      I do agree that the blues are a little too subtly similar.

      As for the legend, I planned to replace that with actual colour swatches.

  2. Thanks to gkatsev on #vim who pointed out that I flubbed the second ]m -- it should be ]M instead. I'll fix that in the next revision.

  3. > As an update on that, I have inked five of the chibis now.

    I see three infographics here. Barry, any ballpark publication date for the remaining two?

    Also, the colors you chose for the legend are awesome! I can easily remember it. Green is for start position and red is for stop, just like traffic lights.

  4. Thanks, Talha.
    There are actually 9 posters in this series, so I have quite a lot of work left to do. Of course, these posters are not the only thing on my plate so I probably only spend an hour every week or two on this project. To assure you that things are still proceeding, I finished inking all of the chibis yesterday. For the mathematicians in the crowd, yes, two chibis are missing from the gallery - they're a surprise and you'll have to wait for the poster they star in. :-)

  5. These are very cool, can we buy printed copies to support your efforts!