突然发现滚轮会被认为是上,然后就在滚历史命令而不是这个页面了,真是尴尬.

在 tmux.conf 加两行即可.

bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M

当然你需要打开滑鼠模式.

set -g mouse on

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.