Prueba esto. Simplemente seleccione texto usando múltiples cursores y presione Cc. Al igual que en cualquier otro editor normal en estos días.
(setq *cutom/bulk-clipboard* nil)
(mc/load-lists)
(push 'custom/copy-across-cursors
mc/cmds-to-run-once)
(push 'cua-copy-region
mc/cmds-to-run-once)
(defun custom/copy-across-cursors ()
(interactive)
(mc/save-excursion
(mc/save-window-scroll
(mc/for-each-fake-cursor
(save-excursion
(custom/copy-across-cursor cursor)))))
(mc--reset-read-prompts)
(push (buffer-substring
(caar (region-bounds))
(cdar (region-bounds)))
*cutom/bulk-clipboard*)
(kill-new (s-chomp (loop for x in *cutom/bulk-clipboard*
concat (concat x "\n"))))
(setq *cutom/bulk-clipboard* nil))
(defun custom/copy-across-cursor (cursor)
(let ((mc--executing-command-for-fake-cursor t)
(id (overlay-get cursor 'mc-id))
(annoying-arrows-mode nil)
(smooth-scroll-margin 0))
(mc/add-fake-cursor-to-undo-list
(mc/pop-state-from-overlay cursor)
(ignore-errors
(custom/cursor-handle-copy)
(mc/create-fake-cursor-at-point id)))))
(defun custom/cursor-handle-copy ()
(when (region-active-p)
(push (buffer-substring
(caar (region-bounds))
(cdar (region-bounds)))
*cutom/bulk-clipboard*))
(when deactivate-mark (deactivate-mark)))
(advice-add #'cua-copy-region
:around (lambda (oldfn &rest args)
(if (> (mc/num-cursors) 1)
(custom/copy-across-cursors)
(apply oldfn args))))
Tenga en cuenta que la dependencia de la biblioteca s está presente. Además, este código espera que use el modo CUA. De lo contrario, debe personalizar la definición de consejos en la parte inferior.
C-x r y
trabajo. :(