Learn Vim motions with an ice-cream van

1 day ago (thisismodest.com)

Neat, but the (presumably AI-generated) provenance of this means it has regrettable gaps and errors:

On "There and back", it says par is 6 – it's solvable in 4.

On "Rush hour", it describes an invalid motion 'r': "type a number first to repeat a command, e.g. 3j or 4r"

It isn't clear why certain motions are being introduced where they aren't relevant, and therefore aren't going to be immediately practised at point of introduction – "Rush hour" introduces gg to go home, but then doesn't need it.

If I'm going to use something to practice and hone my vim motion, I'm going to need it to be an accurate resource. I closed it at this point.

  • Thanks for the feedback, the par is set based on the level, not the absolute best that can be achieved. I added 4r specifically as an example to get across being able to change multiple characters such as XXXX to YYYY.

    Though I’m aware some keyboards might not be fully compatible yet so I’ll work on adding wider support.

    EDIT: You’re right, I loosely included r but it’s not technically “motion”

    • Thanks for following up! I had another play and I see what you mean about par, makes sense.

      It would be great if the 4r perhaps isn't introduced until the game gets into the later stages of editing buffers – I think that would avoid repetitively introducing the same ideas before they can really be used.

      Nice work though and nice idea.

      1 reply →

    • Butting in to add: I'd prefer vim features always be available even if not yet introduced - you don't have to mention the existence of 'r', but keeping it available to my vim habits will cause less frustration to the experiences vimmer.

      1 reply →

    • Great game! Minor issue, the ^ isn't working ABNT2 keyboard on Linux (tested in both Chrome and Firefox). We need it in level=1-5.

On the last exercise of world 6, rewrite the highlight, "cw" leaves the "a" at the end of the line. Both "c$" and "C" work. I didn't know about "C" until I read the web page - I've been using c$ for that.

Fun and helpful little game, thank you! I did find the last world to be a big jump in difficulty, I don't know if there's a better way to explain it or if it's just the nature of the material. Incidentally I got 1 over par on both "Record a routine" and "The full routine", do you know what sequences would be most efficient for those levels?

Beautiful project. Vim controls really found their way into my muscle memory through Tridactyl and Vimium, browser extensions that let you drive web pages and the browser itself with Vim keybinds.

  • There's also Homerow [0] that adds Vimium-like features OS-wide on macOS. It does have some rough edges but overall I've been very happy with it. It usually works well even on apps that don't have proper keyboard navigation implemented and also handles situations with many clickable elements very well (e.g. IntelliJ).

    [0] https://www.homerow.app/

On World 6-3, if i use i.e. d3j to delete the 3 lines it deletes the current line + the 3 below. Vim generally treats commands like that as "do this X times including the current line", so it should delete the current line and the 2 lines below.

Pretty cool game, thanks!

Two suggestions that came to my mind while playing: Would be pretty neat to also been able to navigate the town map with vi bindings and it would also be nice to been able to undo the last keystroke with 'u'.

  • Appreciate the suggestions, I’ll open up the letters so undo works on all the levels, and will look into the navigation (really like that idea)

Yes, hjkl navigation is certainly one of the things that should learn about a vi clone. But are novices well served, in the 2020s, by that being the primary thing that they learn before anything else?

This is not a criticism of this WWW site specifically. The VIM doco has the same priorities, teaching hjkl navigation before arrow keys. (So do nvi2 and NeoVIM.) The problem is that the received wisdom, that arrow keys are some newfangled idea that might not have reached your terminal manufacturer yet, is massively out of date.

Even if one does not teach the arrow keys first, the BS SPC SO (Control+N) DLE (Control+P) set is surely worth teaching early on. One cannot make any reasonable argument that terminals might not have spacebars. (-:

  • The reasons I still use vi-style editing in editors are:

    1. Efficiency, so I can be fast

    2. Minimal stretching and whole-hand movement, so I don't get painful wrists and so I can be accurate.

    Using a keyboard's arrow keys doesn't fit with 2.

    • Touch typing essentially. It's such a comfortable way to work. Remapping mode switching to something like jk instead of Esc is vital to stay comfortably in the home row.

      I always liked this site to grok some of those vim fundamentals [1] and the touch typing part was going to touch typing exercise webpages and getting pure practice.

      - [1] http://learnvimscriptthehardway.stevelosh.com/

    • Doesn’t the act of reaching for the mouse actually creates a natural moment of wrist relaxation? A fixed wrist position creates static muscle tension.

  • I think the reason to use and teach those keys first, is that they can be used in all the motions aswell. The arrow keys can´t and thus do not really make much sense in a vi context.

  • Sorry to be blunt, but if you don’t want to spend effort on touch typing (and therefore avoid arrow keys), learning vim motions is rather pointless and you might as well not bother.

  • hjkl are more of a cult/status thing anyway because they are not _that_ touch-typing-friendly to begin with, and they suck just as much as the cursor keys for moving the cursor around.

    Insisting so much on hjkl is silly. No one is using an ADM-3A in 2026, so the official documentation should let users use the more intuitive cursor keys and downgrade hjkl to what they have always been since vi: __ham-fisted alternatives to the cursor keys__.

I visited on an iPhone, I wasn’t expecting the game to work, but there’s an on screen keyboard you can toggle which works great. Greatly appreciated.

I really like this but feels like it does not really work on a Swedish keyboard layout (macOS), cannot input '$'. Tried both Alt+4 (how you actually input '$') which works in vim and Shift+4 (US layout).

Fun! There are some combinations that don't seem to work though, e.g. "dG" and "dgg" do nothing.

  • Yeah, that’s on me. Sorry. I’m slowly introducing motions so they currently don’t all work in combination, but it makes sense so I’ll look into it

Every roguelike player has these bolted in. Just play Nethack/Slashem/DCSS/Cataclysm DDA:Bright Nights...

Can I go to the place where the Mu-Mu mate and the children still cry "Mine's a 99!"?