在tmux中copy
1. config ~/.tmux.conf
set -g mouse on
set -g mode-keys vi
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
bind-key P paste-buffer
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
tmux source-file ~/.tmux.conf
or
In tmux session:
Ctrl + B then press :, source-file ~/.tmux.conf
2. How to copy
Ctrl + [ to enter tmux vi copy mode
Move around with vim navigation keys
Begin highlight with Space (or v/Shift+v)
Copy with Enter (or y)
Paste with Ctrl + B, Ctrl + ](or Ctrl + P)

浙公网安备 33010602011771号