Vim Recall繁體中文

Unindent inside braces

<i{

Example

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

Shift a brace block’s contents to the left.

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

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

Details & Vim help

Example replayed in Vim

Shift a brace block’s contents to the left.

Combine the < operator with i{ to unindent the inner block. The outer braces are excluded by the text object.