Learn Vim / How to Type and Insert Text in Vim

How to Type and Insert Text in Vim

The answerPress i to enter insert mode before the cursor, type your text, then press Esc to return to normal mode.

Try it on a real buffer

Line 2 should say “learning vim.” — move the cursor onto the “i” of “im” and press i to insert before the cursor, type v, then press Esc to return to normal mode.

Other editors made me reach for the mouse.
I am learning im.
Soon my hands will never leave the keyboard.

Canonical solution: j, move onto the i of “im”, i, v, Esc · par: 6 keystrokes (vimgolf rules — every keypress counts).

Why it works

i drops you into insert mode just before the cursor. Esc (or Ctrl-[) takes you back to normal mode. In and out, fast — vim users spend most of their time in normal mode.

Variations

KeysWhat it does
iinsert before the cursor
ainsert after the cursor
Iinsert at the start of the line
Ainsert at the end of the line
Escback to normal mode — always

Reading about keystrokes doesn't build keystrokes. Try this in a real vim buffer right now — the “Enter insert mode” mission takes about a minute.

Practice free — no signup →

Keep going