6 ms·
No line numbers? @_@
by threatofrain 4y ago
No line numbers? @_@
- Diederich 4y agoNope. 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.
- theposey 4y agocan'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.
- AlecSchueler 4y ago:set nu! Just toggle them off when you copy/paste, then on again. Takes a fraction of a second.
- bayindirh 4y agoIt is already present on the lower right by default. Why lose a column?
- necheffa 4y agoI mean, I have a 32" 4k monitor for a reason.
- avgcorrection 4y agoReason being outdated indexing UX?
- bayindirh 4y agoI mean, every column counts, even in a 32" 4K display. Also, not all of us have the space to fit these screens everywhere we work.
- bluenose69 4y agoI like line numbers because when I'm editing code in a remote meeting, I or someone else can refer to lines by number. The current line is not the only one that matters. I use relative line numbers because I like doing e.g. 9k or whatever. Others on a remote call often refer to other parts of the code with "9 up" or "9 down" (since "9k" and "9j" sound too alike in a noisy call).
- bayindirh 4y agoYou can selectively turn them on as a meeting aid, no?
- Diederich 4y agoYup that's what I do as needed, which for me is pretty rare.
- sodapopcan 4y agoWhen I started pairing every day at work, I used to do: if $WORK_COMPUTER set number endif But then I came to like line numbers and just have 'em on all the time now.
- bmelton 4y agoI gave up absolute line numbers a few years ago in exchange for `:set rnu` and while my navigation capabilities (at least to anywhere I can see) have gotten a lot faster, the ability to `>>` a handful of lines without having to count has felt a ton more productive
- threatofrain 4y agoYou can also set both relative & absolute line numbers at the same time.
- I_complete_me 4y agoI have this in my .vimrc to toggle relative on/off with ctrl-n: > nnoremap <C-n> :exe 'set nu!' &nu ? 'rnu!' : ''
- ur-whale 4y ago> No line numbers? @_@ Are you still using goto's ?
- johncoltrane 4y agoYeah, why enable a feature you never use?