Hacker News new | past | comments | ask | show | jobs | submit login

Nope. Back in the day that would greatly interfere with copy/paste. One way or another, it's so easy to see what line number you're on and/or jump to a specific line.



can't you just yank to +? you might need the vim build with +clipboard if it's not default these days


I have vim use the clipboard by default, with that said I still use the mouse to copy stuff now and then.


Depending 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.


> 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).


What's the advantage of this command over "+y ?


If 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.


Not 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.


It's X11 only. So Wayland or remote users can not use it.


    :set nu!
Just toggle them off when you copy/paste, then on again. Takes a fraction of a second.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: