Investigations

Under Par: Vim Edition

TypeScript December 2025

A Vim golf puzzle game teaching Vim motions through play — complete editing tasks in the fewest keystrokes.

Under Par: Vim Edition gamifies learning Vim. Each level presents a small editing scenario — fix a typo, delete a word, surround text with brackets. You can complete it with any keystrokes, but you're scored by count. Know Vim motions? Better score. Beginner? You can still finish, just less efficiently.

The par scoring system works like golf — each puzzle has a target keystroke count. Beat it and you're under par. The replay mechanism lets you review and refactor your keystroke sequence to find more efficient solutions.

Under the hood, I implemented a full Vim motion simulation: w, b, e, fX, tX, gg, G, 0, $, {, }, and more. The architecture follows hexagonal/ports-and-adapters pattern, which is unusual for a game but keeps the Vim simulation cleanly separated from the UI.

JetBrains Mono font gives it an authentic code editor feel. The spec.md documents the full game design. Vitest provides the test suite.

What this project demonstrates

Vim golf puzzles: complete editing tasks in fewest keystrokes
Full Vim motion simulation: w, b, e, fX, tX, gg, G, 0, $
Par scoring system with replay mechanism
Hexagonal architecture separating Vim engine from UI
JetBrains Mono for authentic editor feel
Vitest test suite included

Technologies

VimGameEducationHexagonal ArchitectureDeveloper Tools

© 2026 Jonathan Leahy · v1.0.5-2-g88a26b5