Comments and docs
Launch day: comment markers are a column (Ctrl-v and I to add them, a block and d to cut them), and gqip rewraps a paragraph.
Saturday, launch day, 8:00 a.m. One job left: the morning report script. The email line and the two below it have to go quiet for launch day (the kitchen's inbox is being moved), the two old lines above them come back for one day, and the README's main paragraph is a single line of 241 characters.
Comment markers are a column. Paragraphs are nouns.
Warm-up from earlier chapters
Two from earlier chapters, from memory, before the new idea. Two wrong tries show the answer.
,USD to the end of this line and the next, different lengths.,USD to the end of this line and the next, different lengths.Columns and paragraphs
Comment markers at the start of lines are a column, so the highlighter rectangle does them: Ctrl-v, down, I # Esc to add them, and a block two characters wide with d to cut them back out. Long prose is a paragraph, and gq is a verb that rewraps it: gqip wraps the paragraph you're in.
gq wraps at the textwidth setting. With none set, as here, Vim uses the window's width, at most 79 characters; set textwidth in your config (72 is common for commit messages) and gq follows it.
email.send(to, report) print("sent") # email.send(to, report) # print("sent")# in front of both: commented out.Short line,another short line,and a third.Short line, another short line, and a third.Stage 1 · Quiet
8:05. The three lines from email.send down go quiet: a block over the three of them and I # . The cursor is on the first one.
This exercise needs a keyboard. Read on, and play it at your computer.
Stage 2 · Back for a day
8:15. The fax and pager lines come back on: their # goes, and nothing else moves. The cursor is on the first one.
Stuck? Show a hint
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.
Stage 3 · Wrapped
8:30. The README's first paragraph, wrapped: gqip from anywhere inside it. Then the paragraph under ## Options is just as long; wrap that one too.
Stuck? Show a hint
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.
Launch week, from memory
Five tools from this week.
# in front of this line and the two below.# in front of this line and the two below.