/*************************************************************************** * vim 退出保留顯示的內容 * 聲明: * 本文主要是記錄是什么決定了vi退出時清屏或者不清屏,因為在busybox中的 * vi就是不清屏,而在ubuntu中的vi是清屏的。vim退出不清屏那么就可以看到退出 * 時的內容,有時候這還是挺有用的。 * * 2016-2-24 深圳 南山平山村 曾劍鋒 **************************************************************************/ 一、參考文章: How to set the bash display to not show the vim text after exit? http://unix.stackexchange.com/questions/60499/how-to-set-the-bash-display-to-not-show-the-vim-text-after-exit 二、解決辦法: 1.環境變量說明: TERM=xterm: in this case when you exit vim it will clear the terminal. TERM=vt100: in this case when you exit vim it will not clear the terminal. 2.設置環境變量: TERM=xterm; export TERM
