ex4722 · 2022-10-18 19:12
Is their a way to get use both the system clipboard and emacs kill section? By default my vim configuration used the vim clipboard for most things but I had keybindings to copy and paste to the system clipboard. Setting this varible I was able to stop emacs from clobbering my system clipboard but I don't see any commands to copy and paste from the system clipboard.
​
`(setq x-select-enable-clipboard nil)`
​
Thanks!
graduale · 2022-10-18 20:31
Have you tried [simpleclip](https://github.com/rolandwalker/simpleclip)?
ex4722 · 2022-10-18 20:48
I have not, it looks very nice. Currently hoping for a native solution that uses evil or just the builtin functions but if nothing works I'll try this.
​
Thank You
graduale · 2022-10-18 22:38
Maybe have a look at [this bit](https://github.com/rolandwalker/simpleclip/blob/023f239275115169c3a3637ad95fae4a036c005e/simpleclip.el#L370) of simpleclip for a lot of possible functions to try. Which one works for interacting with the system clipboard may depend on your system I guess.
ex4722 · 2022-10-19 01:03
Oh wow this is amazing, thanks for sharing. Turns out locally their is a sorta local version if you use evil. With evil if you use evil-paste-from-register ?+ you can paste from system. To copy clipboard-kill-ring-save will work but does not like the whole vim selections stuff
In case anyone ever needs it
`(define-key evil-normal-state-map (kbd "P")(lambda () (interactive) (evil-paste-from-register ?+)))`
HM0880 · 2022-10-19 02:26
Does `(setq save-interprogram-paste-before-kill t)` do what you want? The doc string says, "save existing clipboard text into kill ring before replacing it." This works from system-to-Emacs, and it seems like you want two separate clipboards, but I thought I'd mention the built-in option.
02d5df8e7f · 2022-10-21 10:30
`xclip-mode` works fine for me.