mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Allow repeating evil-mc commands w/ numerical arg
Until gabesoft/evil-mc#110 is resolved.
This commit is contained in:
@ -82,6 +82,22 @@
|
|||||||
:test #'eq
|
:test #'eq
|
||||||
:key #'car))
|
:key #'car))
|
||||||
|
|
||||||
|
;; HACK Allow these commands to be repeated by prefixing them with a numerical
|
||||||
|
;; argument. See gabesoft/evil-mc#110
|
||||||
|
(defadvice! +multiple-cursors--make-repeatable-a (orig-fn)
|
||||||
|
:around '(evil-mc-make-and-goto-first-cursor
|
||||||
|
evil-mc-make-and-goto-last-cursor
|
||||||
|
evil-mc-make-and-goto-prev-cursor
|
||||||
|
evil-mc-make-and-goto-next-cursor
|
||||||
|
evil-mc-skip-and-goto-prev-cursor
|
||||||
|
evil-mc-skip-and-goto-next-cursor
|
||||||
|
evil-mc-make-and-goto-prev-match
|
||||||
|
evil-mc-make-and-goto-next-match
|
||||||
|
evil-mc-skip-and-goto-prev-match
|
||||||
|
evil-mc-skip-and-goto-next-match)
|
||||||
|
(dotimes (i (if (integerp current-prefix-arg) current-prefix-arg 1))
|
||||||
|
(funcall orig-fn)))
|
||||||
|
|
||||||
;; If we're entering insert mode, it's a good bet that we want to start using
|
;; If we're entering insert mode, it's a good bet that we want to start using
|
||||||
;; our multiple cursors
|
;; our multiple cursors
|
||||||
(add-hook 'evil-insert-state-entry-hook #'evil-mc-resume-cursors)
|
(add-hook 'evil-insert-state-entry-hook #'evil-mc-resume-cursors)
|
||||||
|
Reference in New Issue
Block a user