Editing Inside Insert Mode
Ctrl-W, Ctrl-U, Ctrl-H โ readline survivors.
Insert mode has its own tiny set of editing shortcuts inherited from readline: Ctrl-W (kill word), Ctrl-U (kill to start), Ctrl-H (backspace), Ctrl-T/Ctrl-D (indent/outdent).
Insert mode has a small built-in vocabulary of editing shortcuts inherited from old Unix line editors. They're worth memorizing โ they're faster than Ctrl-O for tiny corrections.
| Key | Action |
|---|---|
| Ctrl-H | Backspace one character (same as Backspace) |
| Ctrl-W | Delete previous word |
| Ctrl-U | Delete to start of line (or start of insertion) |
| Ctrl-T | Indent current line one shiftwidth |
| Ctrl-D | Outdent current line one shiftwidth |
| Ctrl-J | Insert a newline (like Enter) |
Watch
- ๐บ #0371 Ctrl-U Delete Line in Insert (not yet published)
- ๐บ #0375 Ctrl-A Insert Previous Text (not yet published)
See also: Indent in Insert Mode, One-Shot Normal Mode