Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable keybinding in Tmux

Tags:

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 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

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

Also I freed the binding from Terminal, in .bashrc

stty -ixon -ixoff
like image 304
if __name__ is None Avatar asked Aug 01 '13 10:08

if __name__ is None


People also ask

How do I turn off Tmux?

To disable the automatic launching of tmux, edit the /etc/bashrc file and comment out the line with tmux. When complete, the bashrc should be as shown in the grep output below.

What is bind key in Tmux?

DEFAULT KEY BINDINGS top. tmux may be controlled from an attached client by using a key combination of a prefix key, 'C-b' (Ctrl-b) by default, followed by a command key. The default command key bindings are: C-b Send the prefix key (C-b) through to the application.


1 Answers

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

or

stty stop undef

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.

good luck.

like image 108
Kent Avatar answered Nov 05 '22 17:11

Kent