Reshape without retyping
The technique
J puts one space between the lines. gU works with any motion or text object.
Keys in this lesson
- J
- Join the next line to this one.
- >>
- Indent the line.
- gUiw
- Make the word upper case.
Before this lesson: Operators and counts.
More about this lesson
Join, indent or uppercase the intended region while retaining its neighbours.
J joins the next line and normally inserts a separating space. gU takes a motion or text object and uppercases that region. >> shifts a line right; a count can cover several lines. Indentation is formatting here, not proof that a program has the intended behaviour.
Example
In a note, J can turn “Read the” and “guide.” into “Read the guide.”. gUiw from guide changes only that word to GUIDE.
Use Reset to try again.