let’s say you have this in a text file:
and you want to change it to this
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!