Reach a line or buffer boundary
The technique
0 would stop on the first space. ^ skips the indent and lands on the first real character.
Keys in this lesson
- 0
- Start of the line.
- ^
- First character that is not a space.
- $
- End of the line.
- gg
- First line.
- G
- Last line.
- 3G
- Line 3.
Before this lesson: Choose a word destination.
More about this lesson
Distinguish column zero, first nonblank, line end and file destinations.
0 reaches column zero, ^ the first nonblank character and $ the last character. gg reaches the first line; G the last. A count before G names a line: 3G reaches line 3. Follow a line jump with 0 when the exact column matters.
Example
On “ review notes”, 0 lands on the first space, ^ on r and $ on s. On a longer document, gg0 establishes the first line and first column regardless of the previous cursor position.
Use Reset to try again.