Mission 04 / 52• Basic Vim

Insert Mode

Normal mode is for moving and operating on text. When you actually want to type, you drop into insert mode — and when you're done, you go straight back to normal.

Entering insert mode

  • iinsert before the cursor
  • ainsert after the cursor (append)
  • escreturn to normal mode

In insert mode the keys behave like any other editor: characters type, backspace deletes, and enter splits the line.

1
const message = "Helo world";

Try fixing the typo above: move onto the missing letter's spot with w, press i or a, type the fix, then hit esc to get back to normal mode.

The habit to build: spend as little time in insert mode as possible. Enter, type, escape. Normal mode is home.

Now it's your turn!

  1. Navigate to each green target across the code.
  2. Combine your movements smoothly to position the cursor where you want to edit.
  3. Complete 10 targets with speed and accuracy!
0/10
1
const foo = findOldestUser(users);
2
const bar = findYoungestUser(users);
3
console.log(foo, bar);
4
console.log(oldestUser, youngestUser);
NORMAL
00:00