View Single Post
Old July 25th, 2013, 08:59 PM   #697 (permalink)
9to5cynic
Senior Member
 
9to5cynic's Avatar
 
Join Date: Feb 2011
Location: /home/
Posts: 4,858
 
Device(s): Galaxy S3 (Verizon) Evo 4G - retired/rooted
Carrier: Verizon

Thanks: 3,066
Thanked 1,763 Times in 1,189 Posts
Send a message via AIM to 9to5cynic
Default

Here's a little vim trick I learned today.

If you want to increment numbers:
1. insert mode (i)
2. type '1.'
3. record mode (q) to a (a)
4. copy Shift V (V)
5. paste with (p)
6. move to the digit
7. Ctrl+a

Now you should have:
1.
2.

Oops... forgot a step - you have to end the recording with another press of q..

From here you can type "3@a" and get this:
1.
2.
3.
4.
5.

If you want this to work with alpha characters, simply type this: "set nf=alpha"


I think it's cool
9to5cynic is offline  
Last edited by 9to5cynic; July 25th, 2013 at 09:05 PM. Reason: forgot a step
Reply With Quote