我刚刚在我的新计算机上安装了Arch,我无法弄清楚需要将什么命令添加到.vimrc才能在退出时恢复shell内容(在调用vim之前)。vim在出口处恢复shell
也就是说,我想我的壳看起来像这样:
# whoami
root
# who
root tty1 2011-12-11 16:42
# vim somefile.txt
#
但相反,它看起来是这样的:
1 hello
2 how is it going?
~
~
~
~
~
~
~
~
#
我刚刚在我的新计算机上安装了Arch,我无法弄清楚需要将什么命令添加到.vimrc才能在退出时恢复shell内容(在调用vim之前)。vim在出口处恢复shell
也就是说,我想我的壳看起来像这样:
# whoami
root
# who
root tty1 2011-12-11 16:42
# vim somefile.txt
#
但相反,它看起来是这样的:
1 hello
2 how is it going?
~
~
~
~
~
~
~
~
#
事实上,它不能做到这一点,除非你的终端支持备用屏幕。对于那些(xterm,gnome-terminal),我相信,vim
会自动执行(相关选项是restorescreen
)。