Reindent the selected lines using the configured indentation rules
=
Example
Visual line 0 / 1Normal 1 / 1 one
two
keepCursor on line 2, column 1 · Line selectionone
two
keepCursor on line 1, column 1Reindent the selected lines using the configured indentation rules.
Reindent the selected lines using the configured indentation rules
Before & after
one
two
keepCursor on line 2, column 1 · Line selectionone
two
keepCursor on line 1, column 1Start in Visual line mode. The highlighted area is observed in Vim. Any displayed register boxes show the exact copied or deleted contents.
Details & Vim help
Example replayed in Vim
Reindent the selected lines using the configured indentation rules. Use in Visual mode. 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.