tags:

views:

29

answers:

2

Sometimes when I edit my file using vi or vim, my file just freezes. Even if I type Ctrl+C or Ctrl+D, it still freezes there. I kill -9 <pid> from another terminal, the pid is killed, but the file still freezes there.

I guess I must have typed some combination of key which I do not know. Does anybody have an idea?

+1  A: 

Do you happen to use it inside GNU Screen? (As pra points out, this is apparently true even outside screen) It's pretty common to accidentally hit Ctrl+S (xoff), which disables screen painting until you hit Ctrl+Q (xon)

Michael Mrozek
I did not use GNU, just log in the unix machine from xshell.
is there any key which will freeze the file if my vim is combined with cscope?
it happens(sometimes) after I types shift+insert, and vi shows: open mode.
Ctr-S is not specific to GNU screen.
pra
@pra Oh, apparently not; good call
Michael Mrozek
+1  A: 

Ctrl-S is probably the culprit; it stops your screen output in most terminals. As Michael mentioned, you can restore your screen to normal by entering Ctrl-Q.

Theoretically, setting stty -ixon should prevent Ctrl-S from freezing your screen, but it's not working on my local Solaris 10 login.

pra