Reach a line or buffer boundary

0 of 5

The technique

Your textVim mode: Normal
Go to the first character of the comment, past the spaces. Before: // review notes. After: // review notes.

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

Jump to the start or end of a line, or to the first or last line of the file.

0 goes to the very first column, ^ to the first character that isn't a space, and $ to the last character. gg goes to the first line and G to the last. Put a number before G to pick a line, so 3G goes to line 3. Press 0 after a line jump when you need the first column.

Example

On “ review notes”, 0 lands on the first space, ^ on r and $ on s. In a longer file, gg takes you to the first line and 12G to line 12, each to its first character.

Use Start over to try again.

Guides on this topic

Exercise 1 of 5

0keys

par 1

Put the cursor at the very start of the return line, before its spaces.

Your textVim mode: Normal

Move the cursor here

4    return saved ? JSON.parse(saved) : null;

Yours

Par

Keyboard shortcuts
Ctrl+Enter
Check the result
Ctrl+Alt+U
Undo the last change
Ctrl+Alt+H
Show the next hint
Ctrl+Alt+R
Start the exercise over
Ctrl+Alt+P
Previous exercise
Ctrl+Alt+N
Next exercise
Ctrl+Alt+K⌃⌥K
Show the keyboard shortcuts
Ctrl+Alt+F⌃⌥F
Turn focus mode on or off
Ctrl+Alt+S⌃⌥S
Open the editor settings
Enter
Go on to the next step after you finish

The Ctrl+Alt shortcuts don't clash with Vim's own keys. On a Mac, use Control and Option.