Vim indent block of code

vim is a great editor. In order to indent a block of code you can do the following:

:4>

- this would indent line no 4 by 1 tab size.

:102,203>>

- this will indent lines 102 through to 203 with 2 tabs.

Use and the result goes the opposite way

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: