Often times it seems I have a list of items, and I need to add numbers in front of them. For example:
Item one
Item two
Item three
Which shoul
Insert a number at the start of the block of text eg.
1. Item One
Enter the vim normal mode command as follows:
qb^yW+P^q
This means:
qb # start recording macro 'b'
^ # move to start of text on the line
yW # 'yank' or copy a word including the ending whitespace.
+ # move one line down to the start of the next line
P # place text ahead of the cursor
^ # move to start of text
# increment text
q # Finish recording macro
What this allows you to do is replay the macro across the last line of numbered list as many times as needed.