Synchronize pasteboard between remote tmux session and local Mac OS pasteboard
- by bhargav
Setup:
I use iTerm2 on MacOS to connect to a remote server.
The remote server runs tmux, in which I open files and edit in vim sessions.
Problem:
I can't copy/paste between the remote tmux session and the local iTerm client. I can use iTerm 2's alt/option + mouse selection to select text, but this copies over multiple vim panes/tmux panes - bad.
Is there any elegant solution to make selections in tmux panes synchronize between the remote pasteboard and the local (MacOS pasteboard)? I've seen reattach-to-user-namespace, but I'm pretty certain it doesn't do what I want.