I have tried Solaris 2.6 and 8 on SPARC and 2.6, 7, and 8 on Intel.
Some UNIXes may be using curses to redraw the screen to show the screen
filea fileb filec
$ vi filec
after the vi session is exited. Solaris and many/most other UNIX variants
will leave the contents of the file that were displayed in the vi window and
the command and messages used to exit vi.
Is there a way to go back to the original window?
Do you mean .... vi doesn't clear the screen after vi session ends?
If so, this question has been asked (and answered) in the newsgroups.
The following is a quote from someone's answer...
vim's documentation says:
You can set or reset the 't_ti' and 't_te'
options in your .vimrc. To disable restoring:
set t_ti= t_te=
To enable restoring (for an xterm):
set t_ti=^[7^[[r^[[?47h t_te=^[[?47l^[8
(Where ^[ is an <Esc>, type CTRL-V <Esc> to insert it)
A note elsewhere says that original vi doesn't have these termcap
options, and that you'll have to edit the termcap entry manually to do
that. (I'm not an expert on this; the Text-Terminal-HOWTO for Linux is a
This is not a matter of the vi but a matter of the content of the terminfo
database. If you like to have the old content back, you need to change the
description for your terminal type in terminfo....
EMail:jo...@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
j...@cs.tu-berlin.de (uni) If you don't have iso-8859-1
schi...@fokus.fhg.de (work) chars I am J"org Schilling
URL: http://www.fokus.fhg.de/usr/schilling ftp://ftp.berlios.de/pub/schily
>>I have been looking for an option or some configuration magic to have vi
>>return the window/screen from which the vi command was called to be redrawn
>>when you exit vi. This is the default action on some UNIXes, but not vi.
>>Is there an option, argument, or configuration parameter that will have the
>>calling screen/window redrawn upon exit?
>vim's documentation says:
> You can set or reset the 't_ti' and 't_te'
> options in your .vimrc. To disable restoring:
> set t_ti= t_te=
> To enable restoring (for an xterm):
> set t_ti=^[7^[[r^[[?47h t_te=^[[?47l^[8
> (Where ^[ is an <Esc>, type CTRL-V <Esc> to insert it)
This would be nonsense idea because the string depends on the terminal type you
use - a typical Linux idea :-(
>A note elsewhere says that original vi doesn't have these termcap
>options, and that you'll have to edit the termcap entry manually to do
>that. (I'm not an expert on this; the Text-Terminal-HOWTO for Linux is a
It's obviousouly not (see above).
The termcap description for xterm always had a definition that restores
the old xterm content and the current /etc/termcap on Solaris still has:
Just compile ved ftp://ftp.berlios.de/pub/ved/
and check it, it has it's complete own termcap implementation.
VI on Solaris uses TERMINFO instead and depends on the terminfo content.
This content (on Solaris) has most likely been defined by AT&T and therefore
may not be what you expect :-(
> Do you mean .... vi doesn't clear the screen after vi session ends?
> If so, this question has been asked (and answered) in the newsgroups.
> vim's documentation says:
> A note elsewhere says that original vi doesn't have these termcap
the note is incorrect, though (btw much of vim's documentation regarding
termcap assumes that it is preferable to hardcode stuff inside vim
rather than make the user's environment correct).