From c2c7def1926b998bd5edc3946059470c046343c5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 23 Sep 2018 10:25:58 -0400 Subject: [PATCH] editor/multiple-cursors: better command whitelist + Fixes explicit usage of evil-escape from evil-mc cursors (e.g. M-x evil-escape or C-g, not the escape sequences jk/fd) + Fixes delete-char (DEL key) from cursors + Fixes all custom commands when used with a COUNT --- modules/editor/multiple-cursors/config.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/editor/multiple-cursors/config.el b/modules/editor/multiple-cursors/config.el index 98fd1bbcc..7fe19db89 100644 --- a/modules/editor/multiple-cursors/config.el +++ b/modules/editor/multiple-cursors/config.el @@ -27,8 +27,10 @@ ;; Add custom commands to whitelisted commands (dolist (fn '(doom/backward-to-bol-or-indent doom/forward-to-last-non-comment-or-eol - doom/backward-kill-to-bol-and-indent)) - (add-to-list 'evil-mc-custom-known-commands `(,fn (:default . evil-mc-execute-default-call)))) + doom/backward-kill-to-bol-and-indent delete-char)) + (add-to-list 'evil-mc-custom-known-commands `(,fn (:default . evil-mc-execute-default-call-with-count)))) + ;; Have evil-mc work with explicit `evil-escape' (typically bound to C-g) + (add-to-list 'evil-mc-custom-known-commands '(evil-escape (:default . evil-mc-execute-default-evil-normal-state))) ;; Activate evil-mc cursors upon switching to insert mode (defun +evil-mc|resume-cursors () (setq evil-mc-frozen nil))