Reindent the lines covered by a motion using the configured indentation rules
Example
Normal 0 / 2Operator pending 1 / 2Normal 2 / 2One TWO
three four
keepCursor on line 1, column 1One TWO
three four
keepCursor on line 1, column 1One TWO
three four
keepCursor on line 1, column 1Reindent the lines covered by a motion using the configured indentation rules.
Waiting for motion or text object
Reindent the lines covered by a motion using the configured indentation rules
Before & after
One TWO
three four
keepCursor on line 1, column 1One TWO
three four
keepCursor on line 1, column 1Start in Normal mode. The key buttons show a concrete motion in place of {motion}. Indentation uses shiftwidth=2.
Details & Vim help
Example replayed in Vim
Reindent the lines covered by a motion using the configured indentation rules. Use in Normal mode. Braced names stand for the required argument and are not typed literally. Availability and exact behavior can depend on Vim build features, options, mappings and editor state; the linked help is authoritative. When 'equalprg' is empty Vim uses its built-in indentation; a configured 'equalprg' runs the external program. Filetype indent settings can change the result.