I want to create a file that has X number of entries where each entry has incremental numbers for Y. I tried recording a macro that would copy the 3 lines then edit the value but it ended up editing the wrong lines. Is a vim macro the correct way of doing this or is there another special way to duplicate lines and increment their numbers?
I realize I could just write a simple programming script that would print out this but I was already editing the file in vim and thought vim is powerful I should figure this out.
Y = 1-30
entry 100/1/Y fields value Y other section Y is valid
Results would be a multiline file that is as followed.
entry 100/1/1 fields value 1 other section 1 is valid ... entry 100/1/30 fields value 30 other section 30 is valid