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. You don't 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

Start typing before or after the cursor, at either end of the line, or on a new line.

i starts typing before the cursor and a after it. I starts at the first character that isn't a space and A at the end of the line. o opens a new line below and O opens one above, even above the first line. Esc finishes every insertion. A new line of code may copy the indentation of the line above, so check it before you add spaces.

Example

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

Use Start over to try again.

Guides on this topic

Exercise 1 of 6

0keys

par 19

The carrier's page should open in a new tab. Add target="_blank" before href.

Your textVim mode: Normal

Make it look like this

// The link to the carrier's tracking page, in the order email.
export function TrackingLink({ url }) {
  return <a className="tracking" target="_blank" href={url}>Track your parcel</a>;
}

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.