views:

83

answers:

3

I want to see the original contents of screen after quitting vim as they were before opening a file , as of not my file quits but the original display is not there

THanks

A: 

If you are using xterm, then see :help xterm-screens, or ... read that anyway as it describes that your problem should be related to some terminfo setting - probably.

HTH

Zsolt Botykai
+1  A: 

The feature of returning screen contents after running a full screen application vs, leaving the contents there, is not specific to vi, but to your terminal emulator. The feature you want to turn on to return to the previous text is often known as 'altscreen'. If you are using xterm as your terminal emulator, this behaviour is default. However if you are running GNU Screen inside of an xterm (or other terminal), you need to add the line

altscreen on

to your ~/.screenrc file. Other terminals that support this feature will have other mechanisms to turn it on and off.

bdk
I am using xterm , i dont have .screen file but i created one and written altscreen on but this does not help its the same
vibhor mittal
The file is .screenrc (not .screen), but that would only be relevant if you are using GNU Screen inside of xterm
bdk
ya but i am not using GNU screen in xterm , so there was no file
vibhor mittal
+2  A: 
Max
thanks for the helpful tip.
Uku Loskit