例如,我在tmux窗口中有三个面板。 现在我的光标在第二个面板。如果我使用:
C-b o
我可以移动到第三个窗格。
但是我想移动到第二个窗格的第一个窗格。怎么做?
它可以列出一个窗口中的所有窗格:
C-b q
它会显示:0,1,2
是否有任何键可以按来前往特定的窗格号码?如果有,我也可以通过简便方式切换到第一个窗格。
来自 @lyuboslav-kanev 的内容
prefix + ;
对我来说完美地解决了问题。
prefix + l
切换到上一个窗口
prefix + L
切换到上一个会话
prefix + l
,即使问题的作者没有询问它。 - ipatch在tmux手册($man tmux)中,您可以找到以下部分:
select-pane [-DdeLlRU] [-t target-pane]
(alias: selectp)
Make pane target-pane the active pane in window target-window.
If one of -D, -L, -R, or -U is used, respectively the pane below,
to the left, to the right, or above the target pane is used. -l
is the same as using the last-pane command. -e enables or -d
disables input to the pane.
所以,我认为你想要的是使用“-l”标志,它用于切换到最后一个窗格。我不知道是否定义了默认的按键映射来执行此任务,但你可以通过自己绑定键来完成此操作。类似这样:
bind -r <your key> select-pane -l
bind -T prefix k select-pane -t :.-
。 - mroavi
C-b q
后,当窗格仍然显示时,您可以键入窗格编号以切换到该窗格。 - chepner