The noon rush
Everything from track one on one file against the clock: inspect it, repair the Formatter's damage, finish it with o O A I and ship. Then take it home: open, save and quit in a real terminal.
Day three, 11:42 a.m. The new lunch menu has to ship at noon, the riders are already lined up outside, and overnight the Formatter ran again. It got to lunch.ts: semicolons missing, first letters gone, stray letters everywhere, as if a cat walked across the keyboard.
Eighteen minutes, one file, everything from your first three days. No mouse.
Warm-up from earlier chapters
Two from earlier chapters, from memory, before the new idea. Two wrong tries show the answer.
Your kit, in one picture
Every motion from this track, one press each from the same cursor. Take ten seconds with it before you start: lowercase pins above the line, uppercase below. The clock beside each stage times you for your own records; the deadline is the story's.
if (!item) throw new Error("not on the menu: " + id);0^bew$f"t:BWEF(Stage 1 · Inspection
11:43. Before you touch anything, read the file: check the three prices, then visit each spot the build log complained about. Every stop says where it is. Any motion from the track; fewest keys wins.
Stuck? Show a hint
f or t for a character you can see, w / e / W for words, j / k with a count for lines, $ and ^ for the endsThis exercise needs a keyboard. Read on, and play it at your computer.
Stage 2 · The Formatter
11:49. Now undo the night's damage, top to bottom: three stray letters, three lost semicolons, two lost first letters, and one more stray. Each one is marked. Get there, fix it, move on.
Stuck? Show a hint
stray letter: ride to it, x · lost semicolon: A;<Esc> · lost first letter: I + the letter + <Esc>This exercise needs a keyboard. Read on, and play it at your computer.
Stage 3 · Ship it
11:56. The file builds again. Four last changes before it ships: a comment on the very first line, the new birria line under the veggie one, LUNCH_STARTS exported like its neighbour, and a note at the end of LUNCH_ENDS. The marks show the text. Each one has a door that works from anywhere on its line.
Stuck? Show a hint
O on the first line · o on the veggie line · I on LUNCH_STARTS · A on LUNCH_ENDSThis exercise needs a keyboard. Read on, and play it at your computer.
Six from the track, from memory
Six situations from your first three days. Press the keys.
Take it home
Everything so far happened in this page. A real Vim works the same way, plus the two things this page can't do: open a file and save it. Open one from a terminal and you start in Normal mode, remote in hand. Saving and quitting are commands you type on the status line: :, the command, then Enter.
| Keys | What happens |
|---|---|
| :w↵ | save (write) the file |
| :q↵ | quit; if there are unsaved changes, Vim refuses and says so |
| :wq↵ | save, then quit |
| :q!↵ | quit and throw away every change since the last save |
Extra practice optional
The chapter is done. These rounds keep going as long as you like: stop whenever it stops being useful.
From the archive: the Formatter
The Formatter is switched off, but its logs make good practice: endless mixed repairs replayed from the incident, across the codebase, in bigger batches as you go.
This exercise needs a keyboard. Read on, and play it at your computer.