93

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:

I hope the updated question is much more useful.

Pang
  • 1,017
dankilev
  • 1,051
  • 1
  • 8
  • 9

1 Answers1

92

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.

Manuel Florian
  • 1,199
  • 8
  • 6