37 ms·
I've always used the + register to copy or paste text in vim (if X11 is enabled). Otherwise, I'll use xclip to handle interfacing with the clipboard. :w !
by u801e 9y ago
I've always used the + register to copy or paste text in vim (if X11 is enabled). Otherwise, I'll use xclip to handle interfacing with the clipboard.
:w !xclip -selection clipboard
or
:r !xclip -o -selection clipboard
- chrisper 9y agoHmm. I don't think that works over ssh?
- u801e 9y agoYou may have to use the -display parameter though the man page for xclip says that it will use the value of $DISPLAY by default. You will also need to enable X11 forwarding over ssh with the -X parameter or with the ForwardX11 option in the ssh config file.