-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[evil-mc] Disable paste transient state when multiple cursors are active #8620
[evil-mc] Disable paste transient state when multiple cursors are active #8620
Conversation
970efa6
to
69f22f8
Compare
Won't it be more robust to write a function that calls either |
@bmag I'm sorry I couldn't get my mind around your suggestion, doesn't or, are you suggesting that I should use something other than edit: ok, I think I get it. will send a new commit. |
Am I doing something wrong here? I am able to get the right command called on both cases, but paste doesn't work on all cursors. (defun spacemacs-evil/evil-mc-paste-after ()
(interactive)
(if (and (eq (evil-mc-get-cursor-count) 1) dotspacemacs-enable-paste-transient-state)
(call-interactively 'spacemacs/paste-transient-state/evil-paste-after)
(call-interactively 'evil-paste-after)))
(defun spacemacs-evil/evil-mc-paste-before ()
(interactive)
(if (and (eq (evil-mc-get-cursor-count) 1) dotspacemacs-enable-paste-transient-state)
(call-interactively 'spacemacs/paste-transient-state/evil-paste-before)
(call-interactively 'evil-paste-before)))
(define-key evil-normal-state-map "p" 'spacemacs-evil/evil-mc-paste-after)
(define-key evil-normal-state-map "P" 'spacemacs-evil/evil-mc-paste-before) |
updated the PR, but it will also require the PR at evil-mc to be accepted before proceeding. |
6d37494
to
aec756e
Compare
evil-mc has no support for the 'paste transient state', hence we should fall back to the default version during that period.
aec756e
to
c15cc87
Compare
If there is nothing else, the mentioned PR from evil-mc lib is merged, so this is also ready to go. |
Thank you ! 👍 |
As per request from syl20bnr/spacemacs#8620 the function names were renamed from `spacemacs-evil/evil-mc-paste-*` to `spacemacs/evil-mc-paste-*`
As discussed at gabesoft/evil-mc#53 evil-mc has no support for the 'paste transient state', hence we should fall back to the default version of paste when multiple cursors are active.