Indent in Insert Mode

Ctrl-T and Ctrl-D, plus 0Ctrl-D and ^Ctrl-D.

Keys: Ctrl-T, Ctrl-D, 0, ^

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

See also: Editing Inside Insert Mode, Indent and Auto-Indent