问题描述
有什么办法可以绑定; (\ 059)传送到tmux中的命令?
Is there some way I can bind ; (\059) to a command in tmux?
默认情况下,它绑定到最后一个窗格;但是,我想将其重新绑定到选择窗格-R.
By default, it is bound to last-pane; however, I would like to rebind it to select-pane -R.
我尝试将以下内容放入我的.tmux.conf中,但似乎没有任何作用:
I have tried putting the following in my .tmux.conf, but none seem to work:
-
绑定\ 059选择窗格-R"-> tmux报告密钥未知\ 059",但忽略警告;"有时确实会按预期工作.
"bind \059 select-pane -R" -> tmux reports "unkown key \059", but after ignoring the warning, ";" sometimes does work as intended.
"bind; select-pane -R"-> tmux报告用法:bind-key ..."
"bind ; select-pane -R" -> tmux reports "usage: bind-key ..."
绑定';' select-pane -R-> tmux报告用法:绑定键..."
"bind ';' select-pane -R" -> tmux reports "usage: bind-key ..."
我现在正在使用第一个选项,但是我想正确地做它,所以每次启动tmux时都不会出现警告.
I'm using the first option now, but I'd like to do it correctly so I don't have a warning appear every time I start tmux.
推荐答案
分号在tmux中也用作命令分隔符,因此要绑定它,您需要对其进行转义:
Semi-colon is also used as a command separator in tmux, so in order to bind it, you need to escape it:
bind-key \; select-pane -R
这篇关于tmux绑定分号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!