How to set the bash display to not show the vim text after exit?
One of the reasons for that behaviour will be the setting of the terminal for each user.
For example:
- 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.
Check what terminal user1 is using with echo $TERM
and set the same for user2.
for bash:
TERM=xterm; export TERM
Such behavior was the only thing that kept me away from using screen
. It uses "screen" terminal and changing it to "xterm" didn't help.
Adding altscreen on
option in ~/.screenrc solved it. From screen's manual:
altscreen on|off
If set to on, "alternate screen" support is enabled in virtual terminals, just like in xterm. Initial setting is `off'.