Hamza Afridi Hamza Afridi
All posts
vim

Why I Built VimVenture: A Vim Game That Actually Teaches You to Think in Vim

Hamza Afridi explains why he built VimVenture, a free browser-based Vim learning game with 54 keystroke-golf puzzles, a daily challenge, and no account required.

31 May 2026 · 3 min read

Why I built VimVenture

I spent three years knowing I should learn Vim properly.

I tried vimtutor. I printed cheatsheets. I watched talks. I got through the basics and then went back to holding down the arrow key whenever I actually needed to get something done. The knowledge didn't stick because I had no reason to compete with myself on it.

The problem with most Vim tutorials is they teach you what a command does, not when to reach for it. You learn that ciw changes the inner word. But you only internalize that when you're in a situation where ciw is the right move and some other approach is wasteful. The contrast is what makes it click.

That gap is what VimVenture is trying to fill.

What VimVenture is

VimVenture is a free, browser-based Vim learning game. 54 keystroke-golf puzzles across 8 themed worlds, starting at hjkl Bootcamp and ending at Macro Mountain. Each puzzle has a starting state, a goal state, and a par: the keystroke count of the optimal solution.

No account, no backend, no tracking. Progress lives in localStorage. You can play right now without signing up for anything.

Why keystroke golf works

When you're trying to solve a puzzle in as few keystrokes as possible, you're constantly asking yourself: is there a more direct path? That question is the whole point of Vim. The editor is built on the idea that common editing operations should have short, composable paths.

A puzzle that takes you 12 keystrokes but has a 6-keystroke par tells you, concretely, that you're doing unnecessary work. The gap is right there. You go looking for what you're missing. When you find it, you feel it — and you remember it.

The par system

Every puzzle carries a canonical optimal solution. A vitest suite mounts a real CodeMirror editor in jsdom and replays each solution through the actual vim engine, checking that it wins and that the keystroke count matches par exactly. Par isn't an estimate or an opinion — it's verified.

But the game isn't punishing. Two-star runs still beat par. One-star runs still complete the level. The stars exist for people who want to push further, not to block anyone.

The daily challenge is seeded by date (no backend needed), so everyone playing on a given day gets the same puzzle. One attempt. Streaks included.

The vim engine

A lot of Vim learning tools implement a rough approximation — enough to teach the basic commands, not enough to feel right. VimVenture uses CodeMirror 6 with @replit/codemirror-vim, which runs a real vim emulation layer. Registers, text objects, counts, macros — they behave. When you practice something here, you're practicing the actual thing.

Keystroke counting follows vimgolf rules: one keydown is one keystroke, including keys typed into : or /. Modifier keys are free.

What made me build it

Honestly? I'd had the idea for a couple of years and kept not doing it. What finally got me moving was noticing I was spending more time thinking about what a good Vim game would look like than actually improving at Vim.

Building it forced me to solve every puzzle at par — sometimes repeatedly, from different angles — to write the lesson text, to verify each solution was actually optimal. I learned more Vim in those months than in the three years before.

The part I'm most proud of is the solvability test. Every level requires a provided optimal keystroke sequence. The test suite replays it in a real editor and fails if the sequence doesn't win or doesn't match par. You can't accidentally ship a broken puzzle.

Who should play

If you've been "meaning to learn Vim properly" for a while but nothing has stuck, the game's structure gives you a concrete feedback loop that tutorials don't. If you already know the basics but catch yourself holding down j more than you'd like to admit, there are probably gaps in your toolbox — and 54 puzzles is a reasonable way to find them.

It's free, it runs in any browser, and you can start right now.

Unknown block type "image", specify a component for it in the `components.types` option

Newsletter

Enjoyed this post?

Get occasional writing on engineering, leadership, and building things that last.