Jay Taylor's notes

back to listing index

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

[web search]
Original source (unix.stackexchange.com)
Tags: SSH vim configuration howto terminal screen unix.stackexchange.com
Clipped on: 2017-12-21

My question is simple, but I am finding it hard to frame/explain it easily.

I log into several Unix boxes with different accounts. I see 2 different things for user1 and user2, while editing text files in vim


When I type vim filename, vim opens and I edit the file. When I close it, the complete text from the file is gone , and I see the Teminals' command/output that was previously present.


When I type vim filename, vim opens and I edit the file. When I close it, the part of file that was present on the display while I was in vim still shows up at the display, and all the previous Terminal display get's scrolled up. Even if the file was just 1 line, after exiting vim, the display shows the first line, with rest all the ~ and I see the command prompt at the bottom of screen.


$ bash --version
GNU bash, version 3.2.25(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2005 Free Software Foundation, Inc.
$ vim --version
VIM - Vi IMproved 7.0 (2006 May 7, compiled Jun 12 2009 07:08:36)

I compared the vimrc files for both users, and I am aware of all the settings, and don't find any setting/config related to this behavior.

Is this behavior related to shell config ? How do I set the things, so that I get the behavior as shown in user1 scenario?

I am not able to describe this easily, also finding it hard to google, as I don't to know what keyword to look for such behavior. Let me know, If I should elaborate further.

asked Jan 7 '13 at 7:43

Hot Network Questions

site design / logo © 2017 Stack Exchange Inc; user contributions licensed under cc by-sa 3.0 with attribution required. rev 2017.12.21.28235

Linux is a registered trademark of Linus Torvalds. UNIX is a registered trademark of The Open Group.

This site is not affiliated with Linus Torvalds or The Open Group in any way.