GNU Screen – Removing vim window after quit

gnu-screenurxvtvim

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?

Best Answer

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.

Related Question