Learn Neovim and LazyVim in your browser. No install, no config, nothing to break.
It's a small game wrapped around a real modal editor. You get eight short levels that teach the stuff you actually use every day, a free play sandbox, belts, achievements, and a few colorschemes to unlock. Live at dojo.cloudwerxlab.com.
| Level | Topic | Keys |
|---|---|---|
| 1 | Modes | i a o Esc |
| 2 | Moving around | h j k l w b gg G |
| 3 | Search and undo | / n N x u Ctrl+r |
| 4 | Save and quit | Ctrl+s :w :q :wq :q! |
| 5 | Yank, delete, put | yy dd p P v V |
| 6 | The spacebar | Which-Key, Space e, Space Space, Space / |
| 7 | Splits and buffers | Space |, Space -, Ctrl+h/j/k/l, H L, Space b d |
| 8 | Git and terminal | LazyGit (Space g g), floating terminal (Ctrl+/) |
Level 9 is a free play sandbox with everything turned on.
Every level has a par keystroke count. Beat it and you get a bonus.
The engine is a pure reducer, one key in and the next editor state out. Normal, Insert, Visual, Visual Line, Command and Search modes all work, and it follows Vim's rules where they matter:
- a whole insert session undoes in one
u Escsteps the cursor back one columnjandkremember your column across short lines:qrefuses to quit with unsaved changes, and closes a split instead of quitting if you have oneSpace b dwon't close a modified buffer
Yanks and deletes also land on your system clipboard.
Touch devices get an on-screen key pad (Vim keys plus a full ABC page), and the mission panel collapses down to your current step. It works, but a real keyboard is a lot nicer for this.
You need Node 20 or newer.
npm install
npm run devThat serves it on http://127.0.0.1:5173.
| Command | What it does |
|---|---|
npm run dev |
Dev server |
npm run build |
Typecheck and build to dist/ |
npm run preview |
Serve the production build |
npm test |
Run the test suite |
npm run typecheck |
TypeScript only |
The tests play every level start to finish with real key sequences and check each step completes in order. There are also tests for the editor engine itself (motions, undo, visual mode, search, ex commands), the reward and achievement logic, and the save data loader. Around 95 in total, and they run in under a second.
This is a static site, so there's no server to run. I'd use Workers with static assets rather than Pages. Cloudflare is putting new features into Workers, and Pages is basically in maintenance mode now. For a plain Vite app the result is the same, and wrangler.jsonc in this repo is already set up for it.
npm install
npx wrangler loginThe domain cloudwerxlab.com needs to be on the same Cloudflare account, because the config attaches dojo.cloudwerxlab.com as a custom domain and Cloudflare creates the DNS record for you.
npm run deployThat builds the site and runs wrangler deploy. First deploy takes a minute while the certificate gets issued. Check what would happen without shipping anything with npm run cf:check, and try the real Workers runtime locally with npm run cf:dev.
In the Cloudflare dashboard go to Workers & Pages, create a Worker from the Git repo, and use:
- Build command:
npm run build - Deploy command:
npx wrangler deploy
assets.directoryservesdist/straight from the edgenot_found_handling: single-page-applicationsends unknown paths toindex.htmlpublic/_headersadds a strict Content Security Policy and the usual security headers, and caches the hashed files in/assetsforever- fonts are bundled (no Google Fonts requests), so the CSP can stay locked to
'self'
If you want a different hostname, change the routes pattern in wrangler.jsonc. If you don't want a custom domain yet, delete the routes block and it'll just live on the workers.dev URL.
src/
engine/ the editor: one file per mode, plus motions, windows, undo, git, terminal
data/levels/ one file per level
hooks/ game state and saved progress
components/ editor UI and game UI
tests/ level playthroughs and engine tests
public/ favicon and Cloudflare _headers
The version number lives in package.json and the UI reads it from there.
Make a new file in src/data/levels/, export a LevelDef, and add it to index.ts. Each step has a check function that looks at the editor state. Then add a playthrough to src/tests/levels.test.ts, which will also tell you if your par count is off.
MIT. Made by CLOUDWERX LAB. Digital Food for the Analog Soul.
If it helped you, you can buy me a coffee.