Anything, but with tmux running inside. You can copy text even in a tty, split the terminal window, detach from and attach to tmux sessions, etc. I will never use a terminal for any moderately complex task without tmux again :)
Position the cursor at the start of the text to be copied, press Ctrl+SPACE to start copying
Position the cursor at the end of the text, press Alt+w or Ctrl+w to copy into the tmux buffer
Press Ctrl+b, ] to paste, possibly into different pane :)
By 'copy', I meant between different tmux panes/windows.
If you open tmux on your host, split it into two panes and SSH into the server in one of them, then you can use this copy functionality. I'm personally not aware of a way to copy between a remote and local tmux session.
Anything, but with tmux running inside. You can copy text even in a tty, split the terminal window, detach from and attach to tmux sessions, etc. I will never use a terminal for any moderately complex task without tmux again :)
i never got the copy part right, what configs are you using?
also, can you copy from a remote (ssh) tmux?
Copying in tmux (assuming default keybindings):
By 'copy', I meant between different tmux panes/windows.
If you open tmux on your host, split it into two panes and SSH into the server in one of them, then you can use this copy functionality. I'm personally not aware of a way to copy between a remote and local tmux session.
ah yes sorry i meant copy to system clipboard.
i succeed in configuring vim so it uses the system clipboard on both local and remote sessions.
i would like to do the same with tmux, but as you said too, it does not seem to be a way.
You absolutely can. You just have to use a clipboard command as the copy/paste. Add this to your
~/.tmux.conf
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xsel -i -b" bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xsel -i -b"
or use your favorite cli clipboard command. Note that those are using the vi bindings; you might have to adapt the config.