Vim Recall繁體中文

Indent an inner paragraph

>ip

Example

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

Shift the current paragraph to the right.

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

Start in Normal mode. expandtab is on and shiftwidth=2; the example starts inside the braces.

Details & Vim help

Example replayed in Vim

Shift the current paragraph to the right.

Combine the > operator with ip to select the nonblank paragraph without its surrounding blank lines. The amount follows indentation settings.