Append and edit a macro
A card can be added to with qA, or laid out with :put␣a↵, corrected like any text, and put back with 0"ay$.
Monday, 2:40 p.m. The item list for the new menu: every item in quotes, with a comma after it. You write the card on the first line and only then notice it puts the quotes but not the comma.
The card is long, and writing it again is a chance to make a new mistake. A card is just text in a jar, and text can be corrected.
Warm-up from earlier chapters
Two from earlier chapters, from memory, before the new idea. Two wrong tries show the answer.
Add a step at the end
Remember "Ayy adding to jar a instead of refilling it? Cards work the same way: qA (a capital) goes on writing at the end of card a. The classic use: you wrote a card and forgot to end it on the next line. qA j q adds the j.
The missing step
A bullet in front of each item: write the card (qa I - Esc q), notice it doesn't move on, add j with qA j q, then cook it on the other four.
This exercise needs a keyboard. Read on, and play it at your computer.
Lay the card on the table
To change a step in the middle, take the card out: :put␣a↵ puts its text on a line of its own, below the cursor. Correct it like any text. Then put it back in the jar: 0 and "ay$ copy the line, without its line break, into jar a, and dd clears the table.
I"<Esc>A"<Esc>ja: the steps, as text. No comma after the second ".Correct the card
Four checkpoints, one list.
- Write and test. The quote card on the first item (qa I
"Esc A"Esc j q), then @a once on the second. Look: no comma. - Correct. G :put␣a↵ lays the card out; add a
,after its second"; 0 "ay$ puts it back; dd clears the line. Then the two items you've cooked get their commas by hand. - Test again on the third item, with @a.
- Apply it to the rest with a count.
The first exercise of every lesson is free. Pro unlocks the rest, every track, for good.
See ProThis exercise needs a keyboard. Read on, and play it at your computer.
I"<Esc>A",<Esc>ja after the correction: the same steps, one comma more. Compare it with the card above.With or without the line break?
You put a card back with "ayy instead of "ay$. What does cooking it with @a do, compared with the card itself?
Cards, corrected, from memory
Press the keys.