gpt4 book ai didi

tmux - tmux 中的高效 Pane 切换

转载 作者:行者123 更新时间:2023-12-01 00:48:23 25 4
gpt4 key购买 nike

tmux 中切换 Pane 时使用 ^B 和光标键,退出 Pane 切换模式并将输入处理返回到 Pane 中的程序的最快方法是什么?

例如,您刚刚使用 ^B 和 Left 切换到左 Pane 中的 shell,现在您想按 Up 和 Enter 重复 shell 的最后一个命令,除了 tmux窃取向上按键以为您仍在切换 Pane 。

必须有一个关键组合或其他东西才能完成 Pane 切换,对吗?

最佳答案

因为用我的键盘按箭头键是“昂贵的”击键,所以我几乎不使用箭头键。

我的 vim 有 ctrl-h,j,kl切换窗口,所以我在 tmux prefix h,j,k,l 中定义切换 Pane 。 (我的前缀是 ctrl-a )

对于命令行编辑,我也不使用任何箭头键,相反,我大量使用 ctrl/alt,我的 ctrl 键处于一个很好的按下位置。所以重新运行最后一个命令,我按ctrl-p,回车。

使用 ctrl/alt 编辑命令行既快捷又方便,因为您不会离开主行。

ctrl-p last cmd
ctrl-h backspace
ctrl-a first col
ctrl-d del current char
ctrl-e eol
ctrl-w remove word backwards
ctrl-b/f back/forward
alt-b/f back/forward a word
alt-d remove word forward
there are a lot more... like ctrl-k, ctrl-u, ctrl-y, alt-. etc.

如果我需要编辑一个非常长而复杂的命令,我会做 ctrl-x ctrl-e ,并在我的 vim 中编辑它。

关于tmux - tmux 中的高效 Pane 切换,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32810493/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com