如何从向上滚动的 tmux 窗格切换到另一个 tmux 窗格?
如果我打开了两个 tmux 窗格,然后使用 CTRL-B [ 转到其中一个窗格并滚动回历史记录,那么由于某种原因,我无法在不滚动当前窗格的情况下切换到另一个窗格回到底部。有谁知道如何解决这个问题?请注意,我使用了一些自定义 tmux 配置,如此处所述,以便更轻松地在 vim 窗口和 tmux 窗格之间导航。这是否会扰乱 tmux 滚动的工作方式?
If I have two tmux panes open and I go to one and scroll back to the history using CTRL-B [
, then for some reason I can't switch to the other pane without making the current pane scroll back to the bottom. Does anyone know how to work around this? Note that I use some custom tmux configuration, as described here, to make it easier to navigate between vim windows and tmux panes. Is this somehow messing up how tmux scrolling works?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当 tmux 处于复制模式时,您是否可能会遇到冲突的默认键绑定?
当 tmux 运行时,您可以通过执行
prefix+?
检查当前活动的键绑定。当我在裸 tmux 配置上执行此操作时,我可以看到Ck
绑定到send-keys -X copy-end-of-line
,并且它将移动处于复制模式的缓冲区到缓冲区的末尾,就像您所描述的那样。或者,如果您使用tmux
的copy-mode-vi
,那么看起来Cj
默认绑定到发送键 -X 复制选择并取消
。尝试将以下内容添加到您的 .tmux.conf 中:
在此配置更新后,我可以使用
Cj
和Ck
导航窗格,如您链接的文章中所述。Is it possible you're running into a conflicting default keybinding for tmux when it's in copy mode?
When tmux is running, you can check the currently active keybindings by doing
prefix+?
. When I do this on a bare tmux config, I can see thatC-k
is bound tosend-keys -X copy-end-of-line
, and it will move a buffer that's in copy mode to the end of the buffer, like you're describing. Alternatively, if you're usingtmux
'scopy-mode-vi
, then it looks likeC-j
is bound by default tosend-keys -X copy-selection-and-cancel
.Try adding the following to your .tmux.conf:
After this configuration update, I'm able to use
C-j
andC-k
to navigate panes like described in the article you linked.