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

Just like in Vim I guess. And while its enabled, it's good to remember that holding shift gives you back the terminal's own mouse/selection handling. Select in Vim and select text in terminal are two different things that are drawn in similar but not identical ways.


> Select in Vim and select text in terminal are two different things

Yup, this is critical if you want to copy stuff out of vim, you generally don't want to accidentally use the terminal selection because you might take any decorations and LF characters not part of the actual file with you. i.e you want to be using vims copy commands not your your terminals context menu. Thankfully enabling mouse makes it override the terminal by default when dragging, but you still need to add a key binding to get it into the system clipboard buffer thingy... I use ctrl-c because i'm not hardcore enough :D

I've also configured vim to draw invisibles as different characters (spaces, tabs, LF), so it makes even less sense to try use the terminal's selection to copy.


If you want to copy stuff from Vim, it's better to use "+y .


Agree except if you're over mosh (no X forwarding etc.)


Yes that's what I'm referring to +y/+p.


Oh, I didn’t know that shift reverts the mouse behaviour. I disable mouse because I like to split my normal Mac copy paste etc from what’s going on in vim but I might give that a shot.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: