问题
I want to copy a large section to the file in tmux. Then I enter the tmux vi mode, and copy the selected strings. However, the system clipboard is empty. How can I copy the selected strings to system clipboard? Thanks.
回答1:
Assuming this is a local instance of tmux, you could add a binding like this:
bind C-c run "tmux save-buffer - | clipboad_manager_of_your_choice"
Where you would fill in the manager of your choice (xclip
, xsel
, if you are on mac pbcopy
, etc)
来源:https://stackoverflow.com/questions/16765716/how-can-i-copy-tmux-output-to-system-clipboard