Fixing Vi paste for us plebs

If you’re like me and not ready to think about your clipboard as a kill-ring, here’s the post for you.

For a long time I have changed visual paste in Vim to not clobber the current register:

vnoremap p "_dp
vnoremap P "_dP

This makes Vim save the deleted text to nothing ("_ is the null register).

It was a little hard to find how to replicate this for DOOM Emacs (granted I am learning):

;; config.el
(setq evil-kill-on-visual-paste nil)

This makes it very easy to paste the same text multiple times or to paste text copied from outside DOOM Emacs.

4 Likes

This bothered me for quite some time, just not enough to look into it myself. Glad I came across your post, now I scratched that itch :smile:

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.