vim屏幕还原 [英] vim screen restore
问题描述
我在屏幕上使用vim进行开发,如果我退出vim,则当前的屏幕内容会保留在那里...
i use vim in screen for development and if i quit vim, the current screen-content stays there...
在屏幕外(xterm),退出vim将还原先前的缓冲区 (如:
outside the screen (xterm), exiting vim will restore the previous buffer (like:
[ server1 ]~$ cmd
some stuff, some stuff
[ server1 ]~$ cmd
[ server1 ]~$ cmd
)
但不在屏幕内.
我试图将xterm用作屏幕内的终端-但没有达到想要的效果.
I tried to use xterm as terminal inside screen - but not with the wanted effect.
感谢帮助!
推荐答案
在主目录中的.screenrc文件中,添加以下行:
In the file .screenrc in your home directory, add the line:
打开备用屏幕
altscreen on
那应该解决它.根据屏幕的手册页,它打开了备用屏幕"支持,就像在xterm中一样."
That should fix it. According to the man page for screen, it turns on "alternate screen" support, "just like in xterm."
我对其进行了测试,它可以满足您的需求.
I tested it out, and it does what you're looking for.
这篇关于vim屏幕还原的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!