Vim Recall繁體中文

Reindent the current line

==

Example

Normal 0 / 2
{
 one
   two
}
keep
Cursor on line 2, column 3

Recalculate the line’s indentation.

Before & after
Before
{
 one
   two
}
keep
Cursor on line 2, column 3
After
{
  one
   two
}
keep
Cursor on line 2, column 3

Start in Normal mode. C indentation is enabled with expandtab and shiftwidth=2.

Details & Vim help

Example replayed in Vim

Recalculate the line’s indentation.

The = operator uses equalprg when configured, otherwise Vim’s indentation rules. This adjusts indentation; it is not general prose wrapping.