Questions tagged [multiple-cursors]

The tag has no usage guidance.

54
votes
4answers
12k views

Fundamentals of multiple-cursors

I recently learned about multiple-cursors, and it looks like a very useful package. I went through the documentation on the original repo, but the commands still look a bit obscure to me. I then ...
7
votes
1answer
969 views

Copying text selected by multiple cursors to a new buffer

Say we want to kill the region selected by all cursors in multiple-cursors, and yank it all to a new, empty buffer. How do you do that with multiple-cursors? Note that a simple copy and paste of the ...
5
votes
1answer
189 views

Keeping only the lines with the cursors in multiple-cursors

Say we have a file with several cursors. Not all lines have cursors, but every cursor is on a different line. How can I kill all the lines without cursors? I couldn't find a single mc command for ...
5
votes
2answers
350 views

Enumerating with multiple cursors?

Say you would for instance define 5 variables with multiple cursors and you wanted to name them x_i where i ∈ {1,2,3,4,5}. Instead of writing 5 rows with x_ and then filling the rest manually, is ...
3
votes
4answers
773 views

Reshape a list into rows

I am looking for an easy way to turn a list such as this: one, two, three, four, five, ... into something more like this: one, two, three, four, five, six, seven, eight, nine,...
1
vote
1answer
39 views

Cleaning the buffer-undo-list of unwanted entries

When multiple-cursors is deactivated, I would like to remove from the buffer-undo-list all entries that look like this: (apply activate-cursor-for-undo 40) (apply deactivate-cursor-after-undo 38) ...
1
vote
1answer
175 views

Why does multiple-cursors use the same char for all cursors with iy-go-to-char, but not with zap-up-to-char?

Both iy-go-to-char and zap-up-to-char take a prefix argument and a character argument prompted for in the minibuffer. Both functions seems to implement this by using (interactive "p\ncPrompt string: ")...