Add eval-and-replace support to evil-mc

And refactor evil-mc-custom-known-commands init
This commit is contained in:
Henrik Lissner 2020-08-02 17:44:41 -04:00
parent c7513e4135
commit c3be74139a
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 23 additions and 11 deletions

View file

@ -120,3 +120,12 @@ FLAGS can be g and/or i; which mean the same thing they do in
:key #'evil-mc-get-cursor-start))
(message "No cursors to undo in region"))
(evil-mc-undo-last-added-cursor)))
;;;###autoload (autoload '+multiple-cursors-execute-default-operator-fn "editor/multiple-cursors/autoload/evil-mc" nil t)
(after! evil-mc
(evil-mc-define-handler +multiple-cursors-execute-default-operator-fn ()
:cursor-clear region
(evil-mc-with-region-or-execute-macro region t
(funcall (evil-mc-get-command-name) region-start region-end))))