Closed romandecker closed 7 years ago
You could use the evil-mc-before-cursors-created
and evil-mc-after-cursors-deleted
hooks to turn off evil change while there are cursors active. See evil-mc-setup.el
for an example on how those hooks are used.
Thanks, I was able to get it to work using this:
(defun my/enable-evil-exchange ()
(general-nmap "c"
(general-key-dispatch 'evil-change
"x" 'evil-exchange
"X" 'evil-exchange-cancel))
(general-vmap "c" 'evil-change))
(defun my/disable-evil-exchange ()
(general-nmap "c" 'evil-change))
(my/enable-evil-exchange)
(add-hook 'evil-mc-before-cursors-created 'my/disable-evil-exchange)
(add-hook 'evil-mc-after-cursors-deleted 'my/enable-evil-exchange)
I have a general.el-mapping for evil-exchange which allows me to use
cx
to do use exchange and still have all the otherevil-change
commands working withc ...
:The problem is that this seems to break when I have multiple
evil-mc
cursors active. I'm guessingevil-mc
does no longer recognize theevil-change
command because now there'sgeneral-key-dispatch
sitting there. When I change the mapping manually back toevil-mc
is working nicely again. Do you have any idea how I could somehow make these three (general.el
,evil-exchange
andevil-mc
) coexist peacefully (I would be fine withevil-exchange
not working when multiple cursors are active)?