将前缀重新映射到 CTRL+A 后如何转到 tmux 中的行首?

问题描述 投票:0回答:2

按照 Archlinux wiki 中的建议,在关于 tmux 的页面中我将命令键前缀重新映射为

C-a
,以模仿 GNU 屏幕并在键盘上使用比
C-b
更容易的东西。所以我的 .tmux.conf 变成了这样:

set -g default-terminal "screen-256color"
unbind C-b
set -g prefix C-a
set-window-option -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R

但是,在屏幕中可以使用

C-a a
跳转到行首,这在 tmux 中不再起作用。作为旁注,我使用的是 iTerm2,没有 tmux 集成。

有人知道如何解决这个问题吗?

谢谢!

macos terminal tmux
2个回答
107
投票

您需要告诉 tmux Prefix+

a
应将前缀键发送到当前窗格中运行的程序:

bind a send-prefix

0
投票

接受的答案对我不起作用,我必须这样做:

bind-key C-a send-key C-a

我正在使用 tmux 版本

3.3a

© www.soinside.com 2019 - 2024. All rights reserved.