12

i use vim in screen for development and if i quit vim, the current screen-content stays there...

outside the screen (xterm), exiting vim will restore the previous buffer (like:

[ server1 ]~$ cmd
      some stuff, some stuff
[ server1 ]~$ cmd
[ server1 ]~$ cmd

)

But not inside screen.

I tried to use xterm as terminal inside screen - but not with the wanted effect.

Thanks for Help!

Drew Stephens
  • 17,207
  • 15
  • 66
  • 82
Beerweasle
  • 1,009
  • 1
  • 12
  • 16

1 Answers1

22

In the file .screenrc in your home directory, add the line:

altscreen on

That should fix it. According to the man page for screen, it turns on "alternate screen" support, "just like in xterm."

I tested it out, and it does what you're looking for.

Derek
  • 3,087
  • 1
  • 21
  • 23
  • 1
    This only works for new screens. If you want this to apply to an existing screen, you have to execute it as a command, doing: `C-a :` `altscreen on` – Renato Jun 25 '12 at 17:05