Currently when I select a bit of text replacing another bit of text (eg "viwp" to paste over the current word) it copies the thing I just replaced into kill ring. So if I try to paste over another bit it has lost the original thing I copied and instead pastes the thing I previously replaced. Obviously I can cycle through the kill ring but that's fiddly and a total pain.

Any idea what variables to look at? I think this happened when I upgraded evil-mode.

  • This is probably related to delete-selection-mode, but I'm not sure how to get the behavior you want. Use M-x find-library RET delsel RET to take a look at the code.
    – nanny
    Commented Feb 18, 2015 at 21:47
  • delsel isn't loaded but I think it's just standard evil-mode behavior to delete selection before pasting. What I don't want is for that selection to end up in the kill-ring. Commented Feb 20, 2015 at 10:42

2 Answers 2


Came across this while Googling for a solution to this problem. What I found to work is part of the Spacemacs FAQ:

(fset 'evil-visual-update-x-selection 'ignore)

See also: https://emacs.stackexchange.com/a/15054/84


That is evil's default behaviour, parallel to VIM. The variable to change this behavior is: evil-kill-on-visual-paste.

To discard the overwritten text:

(setq evil-kill-on-visual-paste nil)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.