Questions tagged [enumerate]
The enumerate tag has no usage guidance.
5 questions
0
votes
1
answer
67
views
Automate Enumeration in vi
Note, this question is about vi, not vim or any other clone. I work on AIX (IBMs UNIX) and the (to my knowledge standard-conforming) vi editor.
Quite often I need to enumerate a list of values, like ...
1
vote
1
answer
321
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
5
answers
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
3
answers
906
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
0
answers
144
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 ...