LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-22-2009, 04:16 PM   #1
eddified
LQ Newbie
 
Registered: Dec 2009
Posts: 3

Rep: Reputation: 0
vim doesn't clear screen inside of screen


I have a question about vim and scrollback.
So when i exit vim, I'm used to vim usually erasing all evidence of it having ever run, and returning to the commandline with the previous command right above it, like this:
[eddie@db1 ~]$ vim
[eddie@db1 ~]$

ie, you can see that I ran vim, but you can't see any of the vim windows or anything, because when I exited, vim erased all of itself, so now all you see is the command I used to get into it.

HOWEVER, now that I'm using screen, and running vim within that, vim doesn't erase itself when I exit, so it muddies up my terminal scrollback with a bunch of old vim windows etc.

Any ideas how i can get it to work how I'm used to within screen, that is to say, when I exit vim, vim will clear up all characters that it placed into the terminal?
 
Old 12-23-2009, 10:59 AM   #2
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 167Reputation: 167
Sounds like a term/termcap issue, what distribution are you using and what term is your client reporting in screen vs out of screen.
 
Old 12-24-2009, 12:49 PM   #3
eddified
LQ Newbie
 
Registered: Dec 2009
Posts: 3

Original Poster
Rep: Reputation: 0
I'm using putty from windows and remotely logging into the linux box over the internet.
Terminal-type string is xterm

[eddie@db1 beyond]$ cat /proc/version
Linux version 2.6.18-128.el5 (mockbuild@builder10.centos.org) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-44)) #1 SMP Wed Jan 21 10:41:14 EST 2009
 
Old 01-03-2010, 02:39 PM   #4
dickey
Member
 
Registered: Jun 2009
Posts: 43

Rep: Reputation: 18
clearing screen inside screen

The behavior is configurable:

man screen:

altscreen on|off

If set to on, "alternate screen" support is enabled in virtual termi-
nals, just like in xterm. Initial setting is `off'.
 
Old 01-04-2010, 10:44 AM   #5
eddified
LQ Newbie
 
Registered: Dec 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Worked perfectly!

Many thanks.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why does vim clear the screen on exit? tsu3000 Linux - Newbie 2 10-06-2011 01:52 PM
how do i replace the clear "clear screen" with the cls command thefedexguy SUSE / openSUSE 2 12-02-2005 05:02 PM
how to clear screen in C ? indian Programming 3 10-01-2004 10:58 PM
clear the screen!!! raven Programming 18 11-24-2003 07:27 PM
Clear the Screen in C++ OrganicX Programming 16 07-23-2003 04:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration