Questions tagged [enumerate]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
261 views

How to copy each line 19 times, incrementing two different numbers by 180?

I had asked a similar question previously (How to copy each line 11 times, incrementing the last "1" in each line from 2-12). I wasn't sure if I should ask this follow-up question in that ...
9
votes
5answers
4k views

How to copy each line 11 times, incrementing the last "1" in each line from 2-12

I have a number of lines in a file, and I would like to copy each line 11 times (turning each line into 12 lines), and increment the last "1" in each line so that the 12 lines have "1" through "12", ...
1
vote
3answers
650 views

How to append a random number between a range [1,10] at the end of each line in vim

I have a graph data in a file with each line containing the source and destination node of an edge. I want to assign a random weight between [1, 10] for each edge to test my graph algorithm. How can i ...
3
votes
0answers
143 views

How to convert lines to numbered list? [duplicate]

I've few lines (or paragraph if easier - {, }) which I would like to convert to numbered/ordered list, in example: Item one Item two Item three into: 1. Item one 2. Item two 3. Item three I would ...