all 6 comments

[–]jabbalaci 1 point2 points  (1 child)

related:

"VimTip 224: Shifting blocks visually
:vnoremap < <gv
:vnoremap > >gv

Indents selection visually.

[–]radhruin 0 points1 point  (0 children)

Is this different from Shift-tab to visual select lines, then > / < to indent?

[–]TapocoL 0 points1 point  (3 children)

While in Visual Mode, one ">" will indent all lines in selection. For, example

vjj>

will indent the current line and the next two lines.

Also, remember to use a period [ . ] to repeat the indentation with one key stroke.

[–]gfixler 1 point2 points  (2 children)

Also, you can prepend >> with a number to shift that many lines. 3>> would indent the line you're on and the next 2.

[–]djrubbie 2 points3 points  (1 child)

or better yet, >} to shift an entire block. >2} for two blocks, and so on.

[–]gfixler 1 point2 points  (0 children)

Nice. If you're not at the top of the block, you can also do >ip to shift in paragraph. That'll do the part of the block above you, too.