3 ms·
Though I understand that this is just an example of the power of `!r`, readers should know that VIM in fact can copy to the system clipboards natively. "*y
by dotancohen 10y ago
Though I understand that this is just an example of the power of `!r`, readers should know that VIM in fact can copy to the system clipboards natively.
"*y
"+y
- jacobmischka 10y agoOnly if it's compiled with clipboard support. I don't know about in other places, but in the default Arch package it's not. So this command is a perfect solution for me.
- Kubuxu 10y agoYou need to install `gvim` which provides `vim` with that feature.
- u801e 10y agoThat requires that vim be compiled with the xterm-clipboard feature enabled. On my Fedora 24 desktop, vim doesn't have it enabled, but gvim does (according to the output of the :version command). One advantage of the method you describe is that it can be limited to just part of a line. Piping output to xclip is limited to complete lines of text due to the nature of :w !.