If you press Ctrl + s while using vim would result with vim to look like as if it is being locked/stuck without you being able to make more changes unless you press Ctrl + q.
Could someone explain what is happening and why?
Hint - it might be something to do with the OS's terminal driver! ;-)
Due to a negative initial perception from the community despite having hinted that this was nothing to do with vim but some novice may search for a solution with regards to vim anyway, I would add:
- This is a duplicate question to many questions, only seen from a different perspective
- Answered at History of Ctrl-S and Ctrl-Q for flow control and What is the point of Ctrl-S?
- More info about Software flow control here
- For remote hosts you can disable Ctrl-S (XOFF) START/STOP signals
- Does Ctrl-S actually stop the process on terminal?
I hope the updated question is much more useful.
21 Answer
Well, It's no a vim issue. This is called Software flow control. There is a bunch of info out there on the internet.
According to an article in here:
CTRL-S (XOFF) is part of Software flow control. XOFF notifies the process or device sending data that the input buffer is full and it shouldn't send any more data. The software (outputting process, firmware, terminal etc) can choose how to handle the notification - i.e. keep running and buffer data, drop data, pause until XON is received, etc.
More info about Software flow control here.
NOTE: if you want to get the control of your terminal after you pressed CTRL + s key combination, you can press CTRL + q.
I hope this helps.
2