Indent object plugin for Vim

Being able to visually select all the lines of code that are at the same indentation level and belong to the same block can be useful. For example, it can be used to comment out all those lines or to increase or decrease their indentation level. This is especially useful in languages like Python that have no braces to indicate opening and closing of blocks of code.

The indent object plugin for Vim sets out to aid in visually selecting all lines of code that belong to the same indentation block. It can be installed for Pathogen by cloning its Github repository.

Go into visual mode (Shift-V) on any line in the block and press ii. All of the lines in the block will be selected and ready for any operation you want to perform on them.

Tried with: Vim 7.3

Leave a Reply

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

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

Google photo

You are commenting using your Google 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

This site uses Akismet to reduce spam. Learn how your comment data is processed.