Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to insert a number sequence in Emacs with multiple cursors?

Tags:

emacs

How can I insert a number sequence with the multiple-cursors package in Emacs?

For example:

aa|    aa1
aa| => aa2
aa|    aa3
like image 891
gnosis Avatar asked Apr 24 '15 03:04

gnosis


1 Answers

Use M-x mc/insert-numbers. By default, it inserts 0 for the first cursor, 1 for the second cursor etc, but you can change this by using a numeric prefix argument. So to get 1, 2, 3 as in your example, use C-u 1 M-x mc/insert-numbers.

like image 132
legoscia Avatar answered Oct 16 '22 17:10

legoscia