如何在 Tmux 中禁用键绑定 [英] How to disable keybinding in Tmux

查看:38
本文介绍了如何在 Tmux 中禁用键绑定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 Tmux 和 Vim 有时会很痛苦.对我来说,冲突之一是 Control-S.我在 Vim 中使用它在拆分中打开缓冲区,但是在使用 Tmux 时,好吧...

Using Tmux and Vim is a pain sometimes. One of the collisions for me is Control-S. I use it in Vim for opening buffers in split, but when using Tmux, well...

Tmux 做了一些愚蠢的事情,我不知道目的是什么.但基本上,当在 Tmux 中按下 C-s 时,屏幕会冻结.它用 C-q 解冻.我不知道这有什么好处,如果有的话.

Tmux does something stupid with it, I can't figure out whats the purpose. But basically, when C-s is pressed in Tmux, screen freezes. And it unfreezes with C-q. I've no idea whats that good for, if anything.

unbind C-s
unbind C-q

我试图在 tmux.conf 中解除 C-s 的绑定,但没有成功.如何解绑?

I tried to unbind C-s in tmux.conf, but it didn't work. How can I unbind it?

我也从终端释放了绑定,在 .bashrc

Also I freed the binding from Terminal, in .bashrc

stty -ixon -ixoff

推荐答案

首先,我要说 Ctrl-S(暂停输出)功能"不属于 tmux.Ctrl+S 和 Ctrl+Q 实际上是 XON/XOFF 协议.它与 Unix/linux 一起存在很长时间.

First of all, I would say that the Ctrl-S (suspend the output) "feature" doesn't belong to tmux. The Ctrl+S and Ctrl+Q is actually the XON/XOFF protocol. It lives with Unix/linux for long time.

您可以通过以下方式禁用它:

You can disable it by:

stty -ixon

stty stop undef

您可以在更改前后通过stty -a 进行检查.更简单的是,尝试上面的命令,然后按 Ctrl-S 看看它是否有效.

you could check by stty -a before and after the change. easier is, try the commands above, and press Ctrl-S to see if it worked.

祝你好运.

这篇关于如何在 Tmux 中禁用键绑定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆