3 ms·
can't you just yank to +? you might need the vim build with +clipboard if it's not default these days
by theposey 4y ago
can't you just yank to +? you might need the vim build with +clipboard if it's not default these days
- deadbunny 4y agoI have vim use the clipboard by default, with that said I still use the mouse to copy stuff now and then.
- u801e 4y agoDepending on your OS, you could use visual line mode and highlight the text you want to copy. Then you can run: '<,'>w !xclip -selection clipboard to copy the text to your clipboard. Macs have another program that works similar to xclip, but I don't remember what it's called.
- xigoi 4y agoWhat's the advantage of this command over "+y ?
- OJFord 4y agoNot GP, but for me it's simply that I remember it (or rather don't need to, because it's just using general purpose mechanisms that I already remember). But now you've said it maybe I'll remember if I need it today, and.. well I'll see.
- u801e 4y agoIf vim doesn't have clipboard support enabled, then this is one way to copy and paste. The vim packages in the Fedora repositories are configured such that vim doesn't have clipboard support, but gvim does.
- OJFord 4y ago> Macs have another program that works similar to xclip, but I don't remember what it's called. pbcopy While I'm here, on Wayland substitute wl-copy (or whatever you use).
- marcthe12 4y agoIt's X11 only. So Wayland or remote users can not use it.