Emacs: Consecutive numbers / digits in a rectangle column / vertically
Posted by rolf on Tuesday, 18 November 2014
In Emacs 24.1, there’s a command
C-x r N (‘M-x rectangle-number-lines’)
for numbering lines.
Mark a vertical strip of 1 char wide rectangle, e.g. with
C-SPC-arrowKeyDown
and press
C-x r N
That's it.
If you want to start from another number than 1, e.g. 12, use the **C-u** prefix, e.g.
C-u C-x r N 12 RET RET
Using the C-u prefix it is also possible to change the format of the numbers, e.g. to
01
02
03
04
blog_external_links:
Add new comment