Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

as someone who lives in vim (with a bunch of splits), often in ssh, copying things out of my editing session has a lifelong struggle (because selection doesn't understand splits).

this article is a good wakeup call, a reminder i've been living with a bad situation that deserves some attention.



Can you ctrl-click and drag to select a rectangular area? That works for me in Gnome terminal in that situation, if I'm understanding you correctly.


Yes and no, at least for me, I have the option of printing whitespace chars as some printable ones (tabs vs spaces). Copying via tmux or the terminal emulator also pick them up, while yanking them on vim does not. Also I'm already too comfortable on vim yank keybindings, the combo yank with movements are very powerful


It works in xfce4-terminal too, so I guess it's something from the VTE Terminal Widget Library [1].

[1]: https://wiki.gnome.org/Apps/Terminal/VTE


I try to re-arrange the split so that there are no vertical splits for the window I plan to copy from, but if you're using a terminal window in vim and want to copy text from it, you can use terminal normal mode and visual line selection to limit it to just the text you want to copy, even if you have a vertical split.


I just zoom in to the window, copy, then zoom out again.

The same workflow works for tmux panes and emacs windows too.




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

Search: