@b0rk I just learned about osc 52 last year.

have you figured out a "start on remote vim in a tmux via ssh -> host of ssh client"

I feel like I've accomplished this a couple times but don't remember how

@b0rk Big +1 on having your terminal editor use the system clipboard. I do that with #HelixEditor on macOS 👍
@pjacock @b0rk I myself never really committed to this.
I prefer having Vim registers separated from the system clipboard, knowing that I can refer to it as * (so "*y to copy to and "*p to paste from the system clipboard).
It is a matter of taste but I otherwise I feel like a register is missing and everything is mixed up…

@b0rk I've love to learn a similar trick for emacs if one exists (I'm sure it does, if one is willing to spend enough parentheses).

Seems like it might be worth mentioning that on many (most?) Linux systems, the middle-click paste buffer is distinct from the ctrl-C/ctrl-V paste buffer.

@cscott that's a great question, I don't know!
@b0rk wow! How do you exactly use that one liner for remote pbcopy through SSH?
@juandesant you can make a script with that as its contents (put #!/bin/sh at the top), make it executable, and call it `pbcopy`
pbcopy

GitHub Gist: instantly share code, notes, and snippets.

Gist
@b0rk cli applications seem to have their own rules whether and how to support copy & paste via mouse: https://stackoverflow.com/a/4608387

@b0rk Watch out copying commands from the web. JavaScript can inject extra commands into a copy-to-clipboard action. Usually it’s used to add a copyright attribution to text you copy from the web but it could be used to add a malicious script.

I tend to paste into a text editor and check it first.

@b0rk When I had to use macOS I fell in love with pbcopy and pbpaste. I was so happy to see that there are wl-copy and wl-paste for Wayland sessions on Linux achieving the same for me.
@b0rk how have I been doing it this long and never knew about OSC. Actually feeling excited to start work and try it now.