Show HN: I built a little browser game to practice Vim commands hjkl.duy.run · 1...
HN Best 200 @best
Show HN: I built a little browser game to practice Vim commands hjkl.duy.run · 11 points · 9 comments · HN thread
TL;DR hjkl is a free browser game by its author dh1011 that teaches Vim commands through short hands-on editing challenges in a simulated Vim editor. It covers motions, text objects, search, marks, counts and repeats, with no sign-up and nothing stored. The Show HN post got 11 points and 9 comments, mostly suggestions and a few technical corrections.
- The game is a set of skill lessons, each with two guided edits, two prompted edits and two independent edits; any valid edit reaching the target passes.
- Skills listed include basic motions, ciw/ci" text objects, counts like 3dd, f/t find, search with / and n, marks, and Ctrl-o/Ctrl-i jumps.
- Type :help in Normal mode to see the commands currently supported.
- It requires a desktop browser with a physical keyboard and needs no account.
- The author says more commands are planned.
- A commenter found that the simulator increments only the number under the cursor for Ctrl-A, while real Vim increments every selected line in a block visual selection.
Discussion The thread is short and friendly. Most comments thank the author or report trying the game, and the rest are feature requests and UX notes. The most substantive comment is a detailed critique from a experienced Vim user, who argues that some lessons teach inefficient habits, such as using vlllld instead of dw and t:t: instead of fY, and points out a difference from real Vim. The author replies to each suggestion by saying they will add or change the feature.
- Positive, useful for practice and unwinding (many): Several commenters say they liked the game and plan to use it to practice Vim. Their thanks are short and the mood is warm.
- Some lessons teach inefficient Vim habits (some): An experienced user argues that ce is better than ciw at the start of a word, that vlllld is a bad habit compared with dw, and that fY is easier than t:t:. They want the game to teach idiomatic commands.
- Simulator differs from real Vim (a few): One commenter found that block-visual Ctrl-A increments only the number under the cursor in the simulator, while real Vim increments every line of the block.
- Requests for better recovery and UX (some): Suggestions include keeping the undo prompt visible after mistakes, letting Vim motions choose the next lesson in the sidebar, and making whole grid cells clickable. The author plans to add these.