Vim Recall繁體中文

Indent inside braces

>i{

Example

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

Shift the contents of a brace block to the right.

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

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 contents of a brace block to the right.

The i{ text object excludes the outer braces. The > operator shifts the selected lines according to shiftwidth and related settings.