I'm sure this happens to lots of people with a Windows background (or even people who live in 'modern' editors like Kate or gedit). Editing in vim, and instead of hitting Escape and :w to save the file, I hit Ctrl-S. Instead of saving the file, the vim session 'hangs' and won't respond to the usual keypresses. This happened to me once before and I must admit that the last time I manually killed the vim process. This time around Google was at hand, and now I know I'm not the only one who's had this problem :-)
Solution: it's not vim's fault, it's actually an xterm thing. In xterm, Ctrl-S is a kind of scroll lock and locks the console. Hitting Ctrl-Q gets things back to normal.
2005.03.12
1.
Rok (2011.01.20 - 07.18)
#
2.
Chris (2012.11.12 - 18.08)
#
Me too! Thank you so much! It was bugging me big time... now how do we unmap it?!
3.
rev (2012.04.19 - 19.51)
#
thanks for posting this... i hit ctrl-s instead of ctrl-d in vim when my hands were not on the keyboard quite right. this has happened several times and i end up killing my terminal session and losing my document changes.
4.
sandy (2010.09.11 - 23.42)
#
Very Helpful! THanks a lot!
5.
Michael Longval (2013.02.10 - 22.05)
#
Thanks you very , very much.
This was driving me nuts!!!!!
6.
bash (2008.11.20 - 19.48)
#
7.
Peter (2014.02.02 - 22.51)
#
LOL, me too man, me too. Thanks for the post. :)
8.
Eric (2014.02.06 - 15.56)
#
This happens occasionally and it sometimes takes me 15 minutes to find a webpage to remind me of the keys required to undo it. I'm finally bookmarking this page! Thanks!
9.
julia (2014.01.21 - 07.53)
#
Thank you SOOOOO much!!!!!
10.
Narendra (2010.10.05 - 05.07)
#
11.
decebal2dac (2013.02.18 - 22.38)
#
12.
Shah (2015.03.03 - 13.27)
#
This is really useful info. Thanks.
13.
dopamine (2015.09.19 - 00.00)
#
14.
Keyur (2011.07.28 - 10.20)
#
Thanks lot... Any idea how to disable 'Ctrl-S' from xterm?
15.
Amaelitha (2011.08.10 - 17.32)
#
Fantastic ! Thanks !!
It happened to me a lot of times. If only I had searched google earlier...
16.
a s d f (2012.11.23 - 15.32)
#
Thank you, thank you, thank you.
I almost destroyed my keyboard trying to get vim alive.
17.
daniel (2011.05.23 - 10.01)
#
very very helpful. thx a lot!
18.
Pradeep (2006.11.10 - 05.56)
#
This is very useful information, i earlier faced this problem and lost my changes as i killed the session manually.
19.
Trashead (2010.04.16 - 03.17)
#
20.
Deepak (2014.06.12 - 22.19)
#
This is truly helpful, Thanks !!!!
21.
Rob (2011.06.14 - 16.44)
#
Brilliant. I cannot tell you how much frustration this has liberated from my life.
22.
HV Gowda (2010.06.08 - 01.18)
#
Thanks a lot it is very helpfull :-).
23.
Anand (2011.11.30 - 10.51)
#
Thanks a real lot. This has ended a long-standing point of frustration for me. I can't recount how many xterms/screens I have had to kill because of this stupid problem. Somehow thought of googling it very late in the day.
Brilliant.
Anand
24.
Ulises (2011.05.14 - 02.22)
#
It also worked for me, I was going to contact IT department, but google is always faster :)
25.
alvin (2013.04.28 - 07.00)
#
haha æ??ä¸?å¤ç?¬å??~
haha thanks~
26.
Allan Daemon (2011.05.15 - 23.58)
#
27.
Vitalii (2012.01.20 - 18.59)
#
28.
Chethan (2012.10.24 - 08.41)
#
Thanks a lot !!!!
Great info..... i was wondering why this is happening tried even xterm help ... no use
Thanks for the very useful info!!
29.
Sal (2012.11.29 - 16.01)
#
For years this bugged me...THANKS! One keystroke I won't forget.
30.
suman (2008.05.13 - 12.43)
#
This is the thing I was looking for long time; great thing, of great help. Thank you.
31.
tednoob (2012.02.07 - 10.15)
#
32.
Narmada (2009.05.13 - 01.19)
#
Thank u. It is very helpful.
33.
varun (2011.03.25 - 09.12)
#
34.
Anuradha (2010.10.21 - 06.42)
#
It worked for me. Thanks a lot. Was looking for it from long time
35.
Cliff (2008.10.23 - 14.00)
#
Thank you so much. I already killed more than 10 sessions for this problem. I should search google earlier...
36.
Pat (2010.07.09 - 23.04)
#
37.
Mehul (2012.09.23 - 22.17)
#
Thanks a ton! It was kind of frustrating when it was happening in a working xterm, now I have solution with your help.
38.
James Strong (2010.08.19 - 14.03)
#
That was SO very helpful, I just kept restart the xterm session.
39.
David (2008.11.05 - 21.58)
#
This trick made my day. Thank you!!
40.
Marto (2012.08.15 - 15.31)
#
41.
loonies (2010.12.28 - 04.13)
#
hahhaha, I'm not the only one :)
thanks a lot!
42.
Priya Sundararajan (2011.04.18 - 15.28)
#
43.
white_rotten_rabbit (2009.08.28 - 12.19)
#
Thank you very much from me too, what a great help!
44.
Vidya Teli (2012.02.16 - 05.46)
#
thanks a lot, it was happening a lot as i was using cscope ctrl \s, everytime i had to kill xterm!!