First edits and modes
The technique
i starts typing before the cursor. Esc ends the insertion and takes you back to Normal mode, where keys are commands again.
Keys in this lesson
- i
- Insert before the cursor.
- Esc
- Back to Normal mode. It also cancels a command you've started.
- hjkl
- Left, down, up, right.
- x
- Delete one character.
- r
- Replace one character with the next one you type.
Before this lesson: Start here: Your first Vim edit.
More about this lesson
Switch into Insert mode and back, then move to a letter and fix it.
In Normal mode your keys are commands, and in Insert mode they type text. i starts typing before the cursor and Esc takes you back to Normal mode. h, j, k and l move left, down, up and right. x deletes the character under the cursor. r followed by a character replaces just that one character, and you stay in Normal mode.
Example
From the p in “plan”, i then “A ” then Esc makes “A plan”. From the a in “plam”, press l to move onto the m, then rn to fix the last letter. Check the mode label before you type.
Use Start over to try again.
Guides on this topic
Exercise 1 of 3
0keys
par 9request returns a promise, so order.status is always undefined. Add await before request.