vim 退出保留显示的内容

/***************************************************************************
 *                        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

二、解决办法:
    .环境变量说明:
        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.
    .设置环境变量:
        TERM=xterm; export TERM

 

posted on 2016-02-24 13:33  zengjf  阅读(3637)  评论(0编辑  收藏  举报

导航