我使用vim,所以我想更改一些tmux的默认绑定。特别是,我希望更改调整大小的命令,以便例如ctrl将拆分后的大小调整为一个位置。我在我的.tmux.conf中输入了以下内容:
bind-key C-k resizep -U
它是有效的,除了它只允许我调整一个单位一次之前,我必须再次点击ctrl。换句话说,我不能按住ctrl,然后按k次(同时仍然按住ctrl),而我可以按住ctrl,按b,然后按上箭头键一次。
有没有人确切地知道这是为什么,或者我可能如何复制我想要的行为?
发布于 2016-03-07 23:42:50
您需要在命令中指定-r
参数:
bind-key -r C-k resizep -U
如tmux手册页所解释的那样:
bind-key [-cnr] [-t mode-table] key command [arguments]
(alias: bind)
Bind key key to command. By default (without -t) the primary
key bindings are modified (those normally activated with the
prefix key); in this case, if -n is specified, it is not neces‐
sary to use the prefix key, command is bound to key alone. The
-r flag indicates this key may repeat, see the repeat-time
option.
https://stackoverflow.com/questions/35857815
复制