Vim Search/Replace/Increment

let’s say you have this in a text file:

item
item
item

and you want to change it to this

ordered_item_1
ordered_item_2
ordered_item_3

You can do this in VIM with the following command:

let i=1|g/item/s//\=”ordered_item_”.i/|let i=i+1

You can do it even more easily using AWK but VIM forever!