Insert and Back Again

i to type, Esc to come home

Keys: i, Esc, Ctrl-[

Press i to enter insert mode and type. Press Esc to return to normal mode. Build the Esc reflex.

You are in normal mode. The cursor sits on a character. Keys do things โ€” they are commands. You want to type some text. How?

Enter insert mode (before the cursor)
KeyNote
i

Press i. The status line shows -- INSERT --. Now keys do what you'd expect: they type characters.

Entering insert mode with i

Type whatever you want. Newlines work. Backspace works. This is just typing.

Typing in insert mode

Coming back

Return to normal mode
KeyNote
Esc

Esc returns you to normal mode. The status line empties. Keys are commands again. Ctrl-[ does the same thing โ€” handy if your Esc key is far away.

Back to Normal with Esc

The Esc Habit

Build a reflex: after every thought, press Esc. Finished a sentence? Esc. Finished a function name? Esc. Done with that loop body? Esc. Normal mode is your resting state, not insert mode. The minute you finish typing, get back to where you can move.

This sounds annoying. After a week, you stop noticing. After a month, you no longer remember what mode you are in โ€” you just know which command to issue, and the right mode shows up.

Make Esc a reflex

Reference

Key Action
i Insert before cursor
Esc Return to normal mode
Ctrl-[ Return to normal mode (alias)
Ctrl-C Return to normal mode (cancels pending state too โ€” but does not run autocmds; usually use Esc)

Worked example โ€” i and Esc

Enter Insert with i; leave with Esc.

Step 1 ยท
[missing screenshot survival.insert-and-back/frame_01.color.svg โ€” run python content/render_screenshots.py]
Step 2 ยท i ยท Insert mode begins.
[missing screenshot survival.insert-and-back/frame_02.color.svg โ€” run python content/render_screenshots.py]
Step 3 ยท bar ยท Three letters typed.
[missing screenshot survival.insert-and-back/frame_03.color.svg โ€” run python content/render_screenshots.py]
Step 4 ยท Esc ยท Esc โ€” back to Normal.
[missing screenshot survival.insert-and-back/frame_04.color.svg โ€” run python content/render_screenshots.py]

Insert mode is for typing characters; Normal mode is for everything else.

See also: Modal Editing, The Modes, More Ways into Insert, Exiting Insert Mode