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.
Indent in insert mode
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
See also: Editing Inside Insert Mode, Indent and Auto-Indent