I often find myself wanting to exchange some text object with whatever's currently in CLIPBOARD (not necessarily in Emacs' kill-ring, when I copy from other programs). But of course when I do something like
dib, it puts what I removed in the CLIPBOARD, overwriting what was in CLIPBOARD (since I didn't first paste it into Emacs), so I can't just
P M-y. So I have to copy it again, next time carefully doing
This feels inefficient. Is there a built-in way in emacs/evil to, instead of deleting, exchanging what I'm removing with what's in CLIPBOARD/top-of-kill-ring?
C-nin normal state after pasting the text?
cheesefrom a different program (so
cheeseis in CLIPBOARD but not kill-ring), and point is within
(cake)and I do
cakein kill-ring & CLIPBOARD, overwriting
cheesein the CLIPBOARD, while
^Pwill move back to whatever I last copied inside Emacs.
(setq save-interprogram-paste-before-kill t).