GNU Screen - Removing vim window after quit

12

3

I use urxvt with GNU screen with X11 on my mac. I like it a lot. My only issue, is that when I quit vim, it puts the shell prompt underneath the vim window. This isn't a huge issue, but it basically hides whatever I was doing before I opened vim. If I use urxvt without GNU screen and quit vim, it hides the vim window and puts my shell prompt right after the prompt that opened vim.

Any idea as to what I can fix in screen to help with this?

Does this have something to do with the screen blanker?

Brian

Posted 2010-09-15T19:53:33.570

Reputation: 359

here is a good link with common settings you should have in your screenrc or .screenrc http://wiki.linuxquestions.org/wiki/Screen

– Spike – 2010-10-27T01:07:30.830

Answers

18

Enable the altscreen option in ~/.screenrc.

Full-screen programs use a terminal feature called "alternate screen", which has a separate screen buffer and (often) minor behavior changes to adapt to such interfaces. The program enters the 'alternate' screen when started, and goes back to 'normal' when exiting.

Since Screen itself acts as a terminal emulator, it has to emulate the alt-screen feature as well. All other terminal emulators enable this feature by default, but Screen has it hidden behind the altscreen option for some historical reasons.

user1686

Posted 2010-09-15T19:53:33.570

Reputation: 283 655

1I can't upvote you enough! – George – 2012-12-15T09:11:26.357

11

Add this line to your ~/.screenrc:

altscreen on

garyjohn

Posted 2010-09-15T19:53:33.570

Reputation: 29 085