Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [multiple-cursors]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
10 views

Bind ctrl-p in doom emacs

I am trying to map a key to C-p and unfortunately the evil-mc-key-map gets in the way. I am using doom emacs on Mac OS. The command to which it is bound is (evil-mc-make-and-goto-first-cursor) with ...
Rareform's user avatar
  • 219
0 votes
1 answer
53 views

multiple-cursors mark-all-like-this does not mark all like this

I have a large text file (2352 lines) which periodically contains the word Generation. I now want to delete all lines containing this word. But when I select the word, do mc/mark-all-like-this, C-a ...
bird-dancer's user avatar
1 vote
1 answer
160 views

:config of use-package is not working for multiple cursors

I have noticed a weird behaviour with use-package for multiple-cursors when trying to customize insertion of numbers. I am able to insert numbers on multiple cursors using C-c n using this code ;; ...
Ajned's user avatar
  • 764
2 votes
1 answer
50 views

How to undo multiple-cursors run-time option?

I use multiple-cursors, and have recently set up on a new machine. Whenever you try to issue a command while multiple cursors are active, and multiple-cursors doesn't know whether it should run for ...
John Graham's user avatar
0 votes
0 answers
61 views

What's the most efficient way to replace one string at one location with a certain string at another location

Quite often I encounter the situation where I need to insert a string from a certain location to some other location. I wanted to know your tips to get this as done as efficient as possible. My ...
Rareform's user avatar
  • 219
0 votes
0 answers
34 views

multiple-cursors activates M-x automatically

Somehow when running mc/edit-beginnings-of-lines and mc/edit-ends-of-lines it activates M-x for all lines, not letting me use the cursors, how to solve this? I just took a look at .mc-lists.el and ...
Renato D.O.'s user avatar
1 vote
1 answer
44 views

Can't use eval-replace-last-sexp in multiple-cursors

In scratch file I has: (* 60 10) (* 50 100) (* 50 200) I want to use my custom function replace-last-sexp (C-c C-l) (defun replace-last-sexp () (interactive) (let ((value (eval (preceding-sexp)))) ...
a_subscriber's user avatar
  • 4,124
1 vote
0 answers
108 views

Multiple cursors skipping lines

I have some code that has names every few lines and wanted to use multiple cursors to edit all of them at once but it seems like it will only edit consecutive lines. By this I mean I have code on ...
user29896's user avatar
0 votes
1 answer
92 views

How show multiple cursors in the start of all lines?

Emacs 26.3 Suppose I has the next text: ACTION ADVENTURE COMEDY CRIME DRAMA FANTASY HISTORICAL HISTORICAL HORROR MAGICAL MYSTERY PARANOID PHILOSOPHICAL POLITICAL ROMANCE SAGA SATIRE SCIENCE SOCIAL ...
a_subscriber's user avatar
  • 4,124
1 vote
0 answers
105 views

Multiple cursors has undefined variables

I installed multiple cursors mode. My init.el has the following at the bottom: (require 'bytecomp) (require 'multiple-cursors) (multiple-cursors-mode 1) (global-set-key (kbd "C-S-c C-S-c") 'mc/edit-...
Mittenchops's user avatar
0 votes
1 answer
762 views

Run current line or selection in shell then insert result in Emacs buffer (Acme workflow)

Given lines like these: pwd echo "Hello \ World" in a buffer, I would like to do the following: Put the cursor to the first line, then press C-` Select lines 3-4 then press C-` to send the line ...
hyiltiz's user avatar
  • 115
0 votes
0 answers
228 views

Regex search and edit text simultaneously with multiple cursors

I'd like to search for a pattern with regex and simultaneously cut or edit all instances of that pattern. Is there a ready-made function for this? Atom, for example, has one such package - by ...
Sati's user avatar
  • 815
3 votes
1 answer
1k views

`use-package` and `define-key`

I'm using multiple-cursors, setting it up with use-package. By default, when multiple-cursors mode is enabled, <return> is bound to multiple-cursors-mode. I'm trying to override that adding this ...
apc's user avatar
  • 319
5 votes
3 answers
291 views

Why multiple-cursor ask me on every line? How avoid this?

emacs 26.1, multiple-cursor https://github.com/magnars/multiple-cursors.el Here my custom Elisp function that add some number(by default 1) to number. (defun increment-number-at-point(number) (...
a_subscriber's user avatar
  • 4,124
1 vote
0 answers
119 views

C-< and C-, keys are echoed as C-\ in no-window mode

I'm trying to edit multiple lines with multiple-cursors package. MC package has C-< keybinding but when I do C-< (Control+less-than sign) it is echoed as C-\ (Control+backslash). I don't know ...
garakchy's user avatar
  • 203
0 votes
1 answer
338 views

Can't paste(yank) selected region by multiple-cursor

Is it possible to copy/paste region. I whant to copy city's name from the next text. Here text: 000 111 222 key=Paris, 555 666 111 222 key=Berlin, 555 666 1111111110 111 key=Toronto, 555 666 ...
a_subscriber's user avatar
  • 4,124
7 votes
1 answer
1k views

Why can't multiple-cursors type in org-mode files?

I use multiple cursors and I use org-mode extensively though the two together does not work. This buffer is in fundamental-mode this is the first line this is the second line I'm going to put ...
Arthur Ulfeldt's user avatar
-1 votes
2 answers
557 views

How can I quit from multiple-cursor mode by ESC

I want to bind ESC to quit from multiple-cursor mode. This code doesn't work: (define-key mc/keymap (kbd "<ESC>") 'mc/keyboard-quit) How can I do it?
Pfedj's user avatar
  • 338
3 votes
1 answer
473 views

Generate different uuid in every line?

I need to replace guid_here by different uuid. provider [guid_here] [guid_here] provider test again [guid_here] test again2 [guid_here] test [guid_here] again2 I use this approach. Install package ...
a_subscriber's user avatar
  • 4,124
0 votes
0 answers
86 views

Why multiple-cursors NOT mark all text between all square brackets?

emacs 26.1 I want to downcase all text between all square brackets. So I try to use multiple-cursors for this: here text: CREATE TABLE [CIndicators] ( [ID] INTEGER NOT NULL PRIMARY KEY ...
a_subscriber's user avatar
  • 4,124
1 vote
1 answer
83 views

Multicursor - not select all word in all lines?

Here is my text: Now I want to select text after "=" and move it to beginning of word "1111" M-x mark-sexp And here is my result: But I need to select the next words on 4 lines: 1111 ...
a_subscriber's user avatar
  • 4,124
9 votes
1 answer
2k views

iedit vs. multiple-cursors

What is the difference between iedit and multiple-cursors? As far as I can tell they provide basically the same functionality.
Martin Buchmann's user avatar
0 votes
1 answer
40 views

How faster show multicursors on the end of all lines?

Som teext 1111111111 2 33333 4444444444444 5555 9999 6666 aaaa aaaaaa zzzzzzzzz hello prev do this My steps: Put cursor to the beginning of first line (1111111111) Press C-> (mc/mark-next-...
a_subscriber's user avatar
  • 4,124
0 votes
1 answer
152 views

How show multicursor only from cursor position?

emacs 26 in my scratch buffer I select dash Now I want to show multicursors only from cursor position (line 5). M-x mc/mark-all-like-this But it show multicursors in whole buffer I also try M-x ...
a_subscriber's user avatar
  • 4,124
4 votes
2 answers
7k views

How can I use multiple cursors in evil/spacemacs

There are multiple multiple-cursors implementations for emacs. I have the impression that extra work has been required to make them work well in evil and spacemacs in particular. I imagine the ...
Croad Langshan's user avatar
1 vote
1 answer
196 views

Is it possible to use increments of two and use padding zeros on mc/insert-numbers?

I'm using mc/insert-numbers quite often for numbering classes on html. I know that I can use C-u 6 M-x mc/insert-numbers to start counting from 6, but how could I use it to create a list like: 06 08 ...
Fabman's user avatar
  • 578
1 vote
1 answer
2k views

how to select and edit text in multiple different lines

everyone I'm trying to achieve a behaviour described here Fundamentals of multiple-cursors. Particulraly the following comment: Edit several places simultaneously. Either mark several instances of a ...
Kirk Walla's user avatar
2 votes
1 answer
113 views

Why does kill-region (C-w) only kill the region marked by the first cursor when using multiple cursors

Having selected five regions with five cursors using multiple-cursors-mode: why is it that when I press C-w or M-x kill-region it is only done for the primary cursor?
Rovanion's user avatar
  • 987
3 votes
1 answer
365 views

Trying to upcase single character (or region) selected *with multiple-cursors active*

I'm trying to get used to multiple-cursors. It's super useful but the way it interacts with many emacs builtin functions seems weird - perhaps I just don't quite understand how it works. Eg. my ...
Mark's user avatar
  • 1,449
5 votes
1 answer
1k views

multiple-cursors and return key

Within multiple-cursors-core.el <return> key is bound to multiple-cursors-mode which always ends multiple-cursors-mode, when I'd like to insert a new line. I can unbind the key with (define-key ...
jue's user avatar
  • 4,576
6 votes
2 answers
428 views

How to scroll while using multiple cursor?

I use a lot multiple cursor and sometimes I have to select some words which are off the screen, in sublime text I do not encounter any problem, I can just scroll and continue selecting words. This, ...
Nisba's user avatar
  • 905
5 votes
1 answer
258 views

Select only even lines emacs

How can I put a cursor (with multiple-cursors) in the beginning of every even line in emacs? Can I use the regular expression .*\n.*\n?
Nisba's user avatar
  • 905
1 vote
1 answer
98 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) ...
lawlist's user avatar
  • 19.2k
1 vote
0 answers
33 views

Recentering if multiple-cursors goes out the screen?

How can I make the functions of multiple-cursors recenter if the next or previous candidate if not show in current screen automatically? Although I known I can do it by C-v and M-v manually. Thanks in ...
Saddle Point's user avatar
5 votes
1 answer
738 views

multiple-cursors + isearch (or phi-search) with Emacs 24+?

For several years, I've been happily using multiple-cursors with phi-search to run interactive searches with several cursors at once with Emacs 23. I would create my multiple cursors, then run phi-...
emk's user avatar
  • 151
1 vote
0 answers
162 views

emacs multiple-cursors insert letters (numbers) issue

I've created an ascii video at https://asciinema.org/a/63b67gx2hm5pasdvjkhiyq4ud to demo my emacs issue with multiple-cursors. I created 4 lines of text and created 4 cursors (see 00:36). Then I use C-...
Just a learner's user avatar
0 votes
1 answer
122 views

how can I change the number of cursors using multiple cursors mc/mark-next-lines?

I encounter many situations where I'd like to use mc/mark-next-lines but I don't know how to change the number of cursors. When I do C-u 2 mc/mark-next-lines I get 7 cursors instead of 3. It would be ...
bertfred's user avatar
  • 1,729
0 votes
1 answer
114 views

Question regarding Emacs Rocks! Episode 13: multiple-cursors [duplicate]

I'm watching the great Emacs Rocks! Episode 13: multiple-cursors vide at youbube: https://www.youtube.com/watch?v=jNa3axo40qM There are several places I'm not clear how the author did it. At 0:32: ...
Just a learner's user avatar
4 votes
2 answers
3k views

How to edit multiple files at once?

Is there a way to open multiple buffers that are open at the same time? The idea is to be able to refactor code and variable names in multiple files at once. I know that dired-do-find-regexp-and-...
Jules's user avatar
  • 1,225
10 votes
0 answers
325 views

Cycle through multiple cursors to enter different text at each point?

When multiple cursors has marked multiple points in a buffer you can use C-v (mc/cycle-forward) to cycle through and look through all cursors while typing for all cursors. I'm wondering how to enter ...
ebpa's user avatar
  • 7,499
10 votes
2 answers
671 views

Multiple cursors package makes emacs run slow

I'm using the package Multiple Cursors in an html file and it's awesome for a few cursors but if I create more than 30 or 50 cursors it gets terribly slow and it takes about five or six seconds just ...
Fabman's user avatar
  • 578
6 votes
1 answer
494 views

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

This a follow up to my earlier question Why does multiple-cursors use the same char for all cursors with iy-go-to-char, but not with zap-up-to-char?. As I describe in that question, for some commands ...
Omar's user avatar
  • 4,832
6 votes
2 answers
769 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 ...
toerq's user avatar
  • 63
6 votes
0 answers
204 views

How to control appearance of extra cursors?

I've just switched to “I-beam” cursor shape, it's set this way: (setq-default cursor-type '(bar . 1) cursor-in-non-selected-windows nil) But when I create additional cursors they are displayed as ...
Mark Karpov's user avatar
  • 4,963
14 votes
2 answers
2k 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 ...
Amelio Vazquez-Reina's user avatar
5 votes
1 answer
285 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 ...
Amelio Vazquez-Reina's user avatar
2 votes
1 answer
396 views

Use multiple cursor if region is active, otherwise use CUA, how?

I’m trying to implement this when I press C-return: If there’s an active region, it activates multiple cursors by calling mc/edit-lines If there’s no active region, it initiates rectangular selection ...
MetroWind's user avatar
  • 187
1 vote
1 answer
280 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: ")...
Omar's user avatar
  • 4,832
3 votes
4 answers
1k 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,...
nispio's user avatar
  • 8,235
3 votes
2 answers
259 views

How to turn off iedit-mode quickly after finishing an edit?

I like how multiple-cursors is turned off when pressing RET, and this is not the case for iedit-mode, how can I emulate that behavior?
shackra's user avatar
  • 2,782