我正在使用 tmux(我通过 ssh 连接到 linux)
我添加了神奇的 set -gterminal-overrides 'xterm*:smcup@:rmcup@'
,它可以启用鼠标滚动,而且效果非常好!
虽然我遇到了问题,但当我由于某种原因使用中间按钮向上滚动时,光标很快就会回到页面下方(就像我输入 q 一样)。 我不知道这是一个刷新的事情还是......
无论如何我都会添加我的 .tmux.conf
文件
# change prefix key to C-a like screen and also C-a-a to send it into
# a session within a session
unbind C-b
set -g prefix C-a
bind-key a send-prefix
# toggle last like screen
bind-key C-a last-window
bind-key C-c new-window
# a readable status line
set -g status-bg blue
set -g status-right "%Y-%m-%d %H:%M:%S"
set -g status-interval 1
# misc tweaks
#set -g display-time 3000
set -g history-limit 5000
#set -g bell-action any
#set -g visual-activity on
#set -g visual-bell on
# Sane scrolling
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
# Bellow allow scrolling with mouse (enter normal browsing mode automatically)
#set -g mode-mouse on
最佳答案
set -g status-right "%Y-%m-%d %H:%M:%S"
此配置使 tmux 每秒更新一次状态行。
关于configuration - 滚动我的 tmux 时自动向下滚动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21490249/