How to set the bash display to not show the vim text after exit?

Xshell客户端在vim编辑文件保存退出,仍然显示文本内容,而不是回到shell terminal终端。

解决办法如下:

  • User1 is using TERM=xterm, in this case when you exit vim it will clear the terminal.
  • User2 is using TERM=vt100, in this case when you exit vim it will not clear the terminal.

具体操作:

1,vim ~/.bashrc

编辑:TERM=‘xterm-color‘

保存退出

2,启动新bash:bash

时间: 2024-08-06 11:39:08

How to set the bash display to not show the vim text after exit?的相关文章

《生活在Linux中》之:在Bash的Emacs模式中使用Vim

export EDITOR=vim ctrl-x ctrl-e <生活在Linux中>之:在Bash的Emacs模式中使用Vim,码迷,mamicode.com

egrep、bash环境配置及脚本、vim编辑器

egrep及扩展的正则表达式 egrep = grep -E egrep [options] pattern [file..] 扩展正则表达式的元字符字符匹配.:匹配任意单个字符[[email protected] ~]# grep -E . /tmp/123ABC123boy []:匹配指定范围内的单个字符[[email protected] ~]# grep -E [abc] /tmp/123boyabc [^]:匹配指定范围外的单个字符[[email protected] ~]# grep

Display certain line(s) from a text file in Linux.

Purpose: Display certain line or lines from a text file, such as : Display the 1000th line from file message.log or Display the lines between 1000 and 1020 from file message.log Solution: Using sed: sed -n '1000,1020p' message.log sed -n '1000,1020p;

vim 退出保留显示的内容

/*************************************************************************** * vim 退出保留显示的内容 * 声明: * 本文主要是记录是什么决定了vi退出时清屏或者不清屏,因为在busybox中的 * vi就是不清屏,而在ubuntu中的vi是清屏的.vim退出不清屏那么就可以看到退出 * 时的内容,有时候这还是挺有用的. * * 2016-2-24 深圳 南山平山村 曾剑锋 *******************

bash shell脚本之查看系统环境变量

查看当前系统环境变量 cat test2: #!/bin/bash # display user information from the system. echo "User info for userid:$USER" echo UID:$UID echo HOME:$HOME 添加执行权限:chmod u+x test2 运行:./test2 结果如下: User info for userid:clarck UID:1000 HOME:/home/clarck

man bash

BASH(1) General Commands Manual BASH(1) NAME bash - GNU Bourne-Again SHell SYNOPSIS bash [options] [command_string | file] COPYRIGHT Bash is Copyright (C) 1989-2013 by the Free Software Foundation, Inc. DESCRIPTION Bash is an sh-compatible command la

Linux下安装oracle数据库提示DISPLAY not set. Please set the DISPLAY and try again。

错误如下: Ignoring required pre-requisite failures. Continuing... Preparing to launch Oracle Universal Installer from /tmp/OraInstall2015-01-29_03-14-51AM. Please wait ... DISPLAY not set. Please set the DISPLAY and try again. Depending on the Unix Shell

bash帮助文档简单学习;bash手册翻译

bash的文档还是要学习的:man -a bash BASH(1) BASH(1) NAME bash - GNU Bourne-Again SHell SYNOPSIS bash [options] [file] COPYRIGHT Bash is Copyright (C) 1989-2005 by the Free Software Foundation, Inc. DESCRIPTION Bash is an sh-compatible command language interpre

马哥2016全新Linux+Python高端运维班-Linux 网络基础管理,包管理,bash脚本练习

本周作业内容: 1.请描述网桥.集线器.二层交换机.三层交换机.路由器的功能.使用场景与区别.     集线器:又称"HUB"主要功能是对接收到的信号进行再生整形放大,以扩大网络的传输距离,同时把所有节点集中在以它为中心的节点上.它工作于OSI(开放系统互联参考模型)参考模型第一层,即"物理层".     二层交换机:工作于OSI模块的第2层(数据链路层),故称为二层交换机.可以识别数据包中的MAC地址信息,根据MAC地址进行转发,并将这些MAC地址与对应的端口记录