Modes, movement and a first edit

0 of 4

The technique

Your textVim mode: Normal
Remove the extra o at the end of typoo. Before: Fix the typoo.. After: Fix the typo..

In Normal mode, keys move or change text. Press i to enter Insert mode and type; Esc returns to Normal.

$ jumps to the end of the line and h moves one step left, onto the extra letter. x deletes it. You stay in Normal mode the whole time.

Keys in this lesson

hjkl
Left, down, up, right.
i
Insert before the cursor.
Esc
Back to Normal mode. Also cancels a command you have started.
$
End of the line.
x
Delete one character.
ciw
Change the word under the cursor.
u
Undo the last change.
Ctrl-r
Redo it.
More about this lesson

h moves left, j down, k up and l right. The cursor and mode label show where you are.

Match the desired result, then return to Normal mode. u undoes the last edit, Ctrl-r redoes it, and Reset restores the starting text.

Guides on this topic

Exercise 1 of 4

0keys

par 4

In Normal mode, move right to the b in blue. The code should stay unchanged.

Your textVim mode: Normal

Desired result

red blue

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.