Commands to indent blocks

参考: http://vim.wikia.com/wiki/Indent_a_code_block


=i{ reindents "inner block" (inside the braces).
=a{ reindents "a block" (including the braces).
=2a{ reindents 2 blocks (this block and containing block).
Instead of "{", you can use "}" or "B", for example, =aB indents a block.

These commands will decrease or increase indents:

>i{ increase indent for inner block.
. repeat last change (increase indent of block again).
<i{ decrease indent for inner block.
With the cursor on { or }:

=% indents the block (including matching brace).
>% or <% indents or unindents the block.

 

posted @ 2016-04-27 11:03  qike  阅读(170)  评论(0编辑  收藏  举报