Lex Luthor wrote:
Taskiss wrote:
Lex Luthor wrote:
If you hit Contol+S when you're in Vim, it hangs not only Vim but also destroys the entire Screen session. ****. This happens to me every once in a while, when I forget I'm in Vim and think I'm in Emacs.
edit:
After 10 minutes my screen session miraculously became unhung.
Try hitting control q.
[miyagi] Xon, Xoff [/miyagi]
Thanks, I will use this the next time it happens.
To clarify, Ctrl+S and Ctrl+Q send XOFF and XON signals in a traditional serial TTY and, by extension, some modern pseudo terminal software packages. If your (pseudo) terminal is set to use XON/XOFF (a.k.a. "software") flow-control, sending XOFF (transmit off) tells the other party that your terminal can't accept any more data at the moment. Things will stay this way until you signal XON again to start accepting transmissions again.
With GNU screen, things get a little more complicated. If you hit Ctrl+s or Ctrl+q, the XON/XOFF signal is caught by screen itself, which suspends/resumes transmissions from the entire screen process. If you want screen to ignore the signal and pass it through to the underlying window, you have to hit Ctrl+a, s or Ctrl+a, q.
You can toggle flow control for individual windows in screen with the flow command, or set the default for all windows in .screenrc. I think the option is 'defflow'. If flow control is turned off in screen, Ctrl+s and Ctrl+q get passed straight to the underlying window without the need for the Ctrl+a wrapper. This will still freeze/unfreeze vim, though, since it handles XON/XOFF signals traditionally. It just won't freeze the whole screen session. To disable the behavior entirely, you might try also disabling flow control in your terminal. I think PuTTY's default is actually XON/XOFF, but there is a "None" option. Haven't tried it myself.