As another answer suggests, you can insert 90 new lines using prefix argument 90
like this: C-u 90 RET
. Then insert the number list using C-u C-x r N
as you did. However, if you want a more flexible format of numbered list, you can use Keyboard Macro counter.
I included some exercises in my guide. Here is one:
Exercise 1: Creating incremental header prefix
Format specification is useful for making formatted output with macro,
combine with the counter, it is useful for appending numbered prefix
at beginning of line. For example: We usually write code comment that
describes sequential steps in a high level point of view like this:
- Step 1 of 5: ...
- Step 2 of 5: ...
- Step 3 of 5: ...
- Step 4 of 5: ...
- Step 5 of 5: ...
Keyboard macro can help us generate such text pattern effortlessly.
- C-x C-k C-f and enter this format:
- Step %d of 5:
- F3 to start recording.
- F3 again to insert the first counter value, which is
- Step 0 of 5:
- RET to move to the next line.
- F4 to stop recording.
- Now press F4 as many time as you want and see header prefix got inserted with incremental values.
You can insert the text any value by simply set the counter with C-x C-k C-c.
Remember to use this the next time you write comments for your code
that need an ordered list to describe the steps of your algorithm.
Of course, instead of enter - Step %d of 5:
, you can just enter %d
. If you want the macro to repeat 90 times, just supply 90
as prefix argument.
To make it easier for you to use macro, remember that all macro commands have C-x C-k as prefix.