Tmux blocks Ctrl-s in OSX ML

Im using iTerm2 + Tmux + Vim.

Here are my dotfiles: https://bitbucket.org/furion/dotfiles/src

The problem I encountered is when Vim opens in a Tmux session, the Cs binding does not work.

When I run Vim only in a regular iTerm2 session, Cs working fine. Since I reuse this keystroke, it really disappoints.

In addition, this problem is only present in OSX. On my Arch panel, Tmux or not, everything works fine.

EDIT: I have already disabled the control flow:

 bind -r '\Cs' stty -ixon stty stop undef 

This issue only applies to OSX. In addition, its only under Tmux on OSX. Without Tmux, no problem. There are no problems with Arch Linux with or without Tmux.

+4
source share
2 answers

This is probably due to flow control: historically (and still today, in some terminals), Ctrl-S pauses the output, and Ctrl-Q resumes it.

iTerm2 ignores Ctrl-S, as it suggests that it is not needed for flow control in a world where 300 and 2400 baud modems are not all that common.

I'm not sure, but I think stty -ixon might help.

(I am provisionally responding since it was 5 hours, but I could come to a decision, although I think the reason is correct).

+4
source

I realized what to fix, but I do not know why this is happening.

I make a TMUX command to reload the configuration file, also run stty -ixon .

This must be done manually, even if it is installed in .bashrc or .profile , since the problem appears after initialization.

Here is the corresponding TMUX configuration line :

 bind-key r run "tmux source-file ~/.tmux.conf; stty -ixon" 
+1
source

Source: https://habr.com/ru/post/1500826/


All Articles