有时我的文件只是在 vi | vim 中冻结,发生了什么? [英] sometimes my file just freezes in my vi |vim, what happened?
问题描述
有时当我使用 vi 或 vim 编辑我的文件时,我的文件会冻结.即使我输入 Ctrl+C 或 Ctrl+D,它仍然冻结在那里.我从另一个终端 kill -9
,pid 被杀死,但文件仍然冻结在那里.
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?
推荐答案
Ctrl-S 可能是罪魁祸首;它会在大多数终端中停止您的屏幕输出.正如迈克尔所说,您可以通过输入 Ctrl-Q 将屏幕恢复到正常状态.
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.
理论上,设置 stty -ixon
应该可以防止 Ctrl-S 冻结您的屏幕,但它不适用于我的本地 Solaris 10 登录.
Theoretically, setting stty -ixon
should prevent Ctrl-S from freezing your screen, but it's not working on my local Solaris 10 login.
这篇关于有时我的文件只是在 vi | vim 中冻结,发生了什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!