Indenting an x number of lines in vim

Posted by Mack Stump on Super User See other posts from Super User or by Mack Stump
Published on 2010-12-24T03:16:54Z Indexed on 2010/12/24 3:56 UTC
Read the original article Hit count: 264

Filed under:
|
|
|

I've been coding in Java for a job recently and I've noticed that I'll write some code and then determine that I need to wrap the code in a try/catch block.

I've just been moving to the beginning of a line and adding a tab.

0 i <tab> <esc> k (repeat process until at beginning or end of block)

Now this was fine the first three or four times I had to indent but now it's just become tedious and I'm a lazy person.

Could someone suggest an easier way I could deal with this problem?

© Super User or respective owner

Related posts about vim

Related posts about hotkeys