logoalt Hacker News

Show HN: I built a little browser game to practice Vim commands

39 points • by dh1011 • today at 3:10 AM • 27 comments • view on HN

I made hjkl to help myself remember Vim commands. It’s a little browser game you can play when you want to unwind and get a bit of Vim practice in.

There are still a lot of commands I want to add, but I hope someone finds it useful in the meantime :)


Comments

glibg10b • today at 6:23 AM

For all of the ciw examples, ce is easier since the cursor is at the first letter of the word.

Where dw works, this game teaches vlllld instead, which is a bad habit to teach.

Ctrl+A increments the first number after the cursor, which is easier than, say, f6r7 in cases where they do the same thing. Similarly, Ctrl+X decrements.

t:t: is weird when fY is much easier.

The Vim simulator has a minor difference compared to real Vim:

    0
    0
Start on line one and do CTRL-V then j then CTRL-A. Real Vim would increment both. The simulator only increments the one under the cursor.
autuni • today at 8:24 AM

I have considered getting into Vim a couple of times because it always seemed like the thing to do, but never did.

It does not make sense to me that I should use an editor I need to study and practice for. It can't possibly that much more efficient, especially given that usually speed is not the limiting factor for what I do.

Maybe one day I will be tempted to find out why it's supposedly worth it again.

➕ show 6 replies
TheBuc • today at 10:26 AM

Cool, this could be a big help for those just starting out!

zzril • today at 9:10 AM

I was somewhat irritated that the exercises allow you to stay in insert mode at the end. I think it might do better at teaching the concept of an "edit" as a single, repeatable action by requiring you to go back to normal mode.

usrme • today at 5:40 AM

I did the first challenge or exercise, but I was honestly a little surprised that Vim motions aren't able to be used to choose the next exercise(s) in the sidebar that becomes visible. That could potentially be something that the player unlocks later on as well.

➕ show 1 reply
parasti • today at 7:42 AM

This got a laugh out of me. I guess I practiced vim commands in the most boring way - by using vim.

internet_points • today at 8:31 AM

The best game to learn hjkl movement will always be nethack :)

jaydonb • today at 5:21 AM

This is great, definitely going to be using this to practice!

One note: It might be useful to keep the "undo" prompt when the user messes up after the first two prompted lessons for a clear recovery path.

Thank you for making this!

➕ show 1 reply
francescobonomi • today at 8:35 AM

This unlocked the memory of when I first used vimtutor and discovered the beautiful world of vim, that was also a great resource

alabhyajindal • today at 7:03 AM

very cool! one feedback - when i selected all skills the game started with all the options of "fix a typo" first - i would like a version where all the challenges are jumbled up.

also there is an opportunity to turn this into something like vim.golf but in the browser

etuil • today at 7:59 AM

the marker "ma" exercises are a bit confusing since you do make a marker but in most cases you don't have to go back to make a change to that marker

anil_gr • today at 5:31 AM

Cool, a small ux issue I noticed is that the grid cells are not clickable as a whole.

➕ show 1 reply
sponno • today at 6:45 AM

Very annoyed I cannot operate the website with the keyboard, have to do the practices then use my mouse.

syngrog66 • today at 7:51 AM

vim use is whats reliably helped me to remember vim commands. a bonus is I can use the same tactic for all other software and in many other domains where I'd like to keep related skills fresh in mind, at figurative fingertips

senectus1 • today at 5:26 AM

oh man this is great. thank you!

➕ show 1 reply
rivetworkshop • today at 6:05 AM

[flagged]

amarlearning • today at 6:48 AM

[flagged]