Choose where typing begins

0 of 6

The technique

Your textVim mode: Normal
Add today to the end of the line. The cursor is in the middle. Before: // review. After: // review today.

A goes to the end of the line first, wherever the cursor is. No need to move there yourself.

Keys in this lesson

i
Insert before the cursor.
a
Insert after the cursor.
I
Insert at the start of the line's text.
A
Insert at the end of the line.
o
New line below.
O
New line above.

Before this lesson: Reach a line or buffer boundary.

More about this lesson

Choose insertion before/after a character, at a line boundary, or on a new line.

i inserts before the cursor; a after it. I starts at the first nonblank character; A at the end. o opens below; O opens above, even above the first line. Esc completes every insertion. New code lines may inherit indentation; inspect it rather than adding spaces blindly.

Example

From anywhere on “review”, A then “ today” then Esc makes “review today”. O then “Plan” then Esc adds a separate line above. I would add text to the existing line instead.

Use Reset to try again.

Guides on this topic

Exercise 1 of 6

0keys

par 8

Add “brief ” before the message; keep the rest.

Your textVim mode: Normal

Desired result

const message = "brief Read short reports";

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
Reset the exercise
Ctrl+Alt+P
Previous exercise
Ctrl+Alt+N
Next exercise
Enter
After a solve: the next step

Ctrl+Alt shortcuts leave Vim's own keys alone. On a Mac, Control and Option.