Exiting Insert Mode
Three ways out, and why people remap.
Esc, Ctrl-[, and Ctrl-C all exit Insert mode โ but they're not identical. Esc and Ctrl-[ trigger InsertLeave; Ctrl-C bypasses it.
There are three ways out of Insert mode. Two are equivalent, one is subtly different โ and that subtle difference matters.
| Key | Note |
|---|---|
| Esc | The canonical exit. |
| Ctrl-[ | Identical to Esc (terminal heritage). |
| Ctrl-C | Exits, but skips InsertLeave. |
Watch
- ๐บ #0366 Escape / Ctrl-[ Leave Insert (not yet published)
- ๐บ #0368 Ctrl-O One Normal Command (not yet published)
See also: One-Shot Normal Mode, The Modes