Indenting an x number of lines in vim
- by Mack Stump
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?