这是我的.tmux.conf
set-option -g prefix C-\
bind-key C-p select-pane -U
bind-key C-n select-pane -D
bind-key C-b select-pane -L
bind-key C-f select-pane -R
Run Code Online (Sandbox Code Playgroud)
我想要的是绑定C-\ C-b切换到左窗格、C-\ C-f切换到右窗格等等。但是当我启动 tmux 时
我收到了消息。
知道怎么做吗?.tmux.conf:2: usage: set-option [-agosquw] [-t target-session|target-window] option [value]
这与您选择的前缀 C-\ 有关。'\' 字符用于指示下一行是 set-option 命令的延续。在 C-\ 后面添加一个空格或引用 C-\,如下所述: https: //superuser.com/questions/417236/tmux-with-non-alphanumeric-prefix
您可以使用以下内容:
set-option -g prefix 'C-\'
bind-key C-p select-pane -U
bind-key C-n select-pane -D
bind-key C-b select-pane -L
bind-key C-f select-pane -R
Run Code Online (Sandbox Code Playgroud)