Indent in Insert Mode
Ctrl-T and Ctrl-D, plus 0Ctrl-D and ^Ctrl-D.
Ctrl-T indents, Ctrl-D outdents โ both by one shiftwidth. The 0Ctrl-D variant kills all indent on the current line; ^Ctrl-D kills indent for this line only.
Indenting from inside Insert mode keeps you in flow. Ctrl-T and Ctrl-D are the bread-and-butter; two special prefixes give finer control.
| Sequence | Action |
|---|---|
| Ctrl-T | Indent current line one shiftwidth |
| Ctrl-D | Outdent current line one shiftwidth |
| 0Ctrl-D | Remove ALL indent on this line |
| ^Ctrl-D | Remove indent on this line only (restore on next) |
Watch
- ๐บ #0376 Ctrl-@ Insert Previous + Leave (not yet published)
- ๐บ #0378 Ctrl-Y Copy from Above (not yet published)
See also: Editing Inside Insert Mode, Indent and Auto-Indent