- 可以用滑鼠捲動。
- 複製貼上可以與系統的剪貼簿整合。
# Enable mouse scrolling
set -g mouse on
# Vim style navigation in copy mode
setw -g mode-keys vi
bind P paste-buffer
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 -T copy-mode-vi r send-keys -X rectangle-toggle
# Tutorial: copy-pase through tmux buffer
#
# default <prefix> is <C-b>
# using `<C-b> + [` to enter copy mode
# using `v` to start selection
# using `y` to copy selection
# it will get the text stored at two places: tmux copy buffer and system clipboard
# using `ESC` to clear selection
setw -g mode-keys vi
bind P paste-buffer
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 -T copy-mode-vi r send-keys -X rectangle-toggle
# Tutorial: copy-pase through tmux buffer
#
# default <prefix> is <C-b>
# using `<C-b> + [` to enter copy mode
# using `v` to start selection
# using `y` to copy selection
# it will get the text stored at two places: tmux copy buffer and system clipboard
# using `ESC` to clear selection
# using `q` to leave copy mode
# using `<C-b> + P` to paste at another tmux session
# using `<C-b> + P` to paste at another tmux session