evil
evil copied to clipboard
Add variable to prevent evil-change from inserting into kill-ring
This PR adds a variable evil-change-prevent-kill-ring
that if non-nil causes the text deleted from a call to evil-change
to be stored in the void register by default.
Thanks for the PR @NicholasBHubbard. Does this emulate a setting in vim? Have you considered advising evil-change? Something like this (only v briefly tested) could work:
(define-advice evil-change (:around (fn &optional beg end type reg yh df) reg-or-black-hole)
(funcall fn beg end type (or reg ?_) yh df))
No it doesn't emulate a setting in vim (that I'm aware of). I use similar advise to what you provided in my own config, I just thought it may be useful for others to have the functionality available as a variable setting. I understand if you don't think this PR aligns with the goals of evil-mode.
We certainly do have settings in evil where there is no corresponding setting in vim, but I think a good rule of thumb is to add them when there is demand from multiple people, otherwise our settings start to become a collection of odd hacks & tweaks from various users. I would say a couple of 👍s on this PR over the next couple of months would be enough to convince me to merge.