Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

configuring vi

8 views
Skip to first unread message

Bobby Higgins

unread,
Jan 23, 2003, 8:52:35 PM1/23/03
to
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?

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
something like:

$ ls
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?


Harry

unread,
Jan 24, 2003, 12:15:25 AM1/24/03
to
Bobby Higgins wrote...

>
>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?

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...

<quote

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
good reference.)

quote/>

Joerg Schilling

unread,
Jan 24, 2003, 5:03:42 AM1/24/03
to
In article <D%0Y9.14180$eM6....@rwcrnsc51.ops.asp.att.net>,

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

Joerg Schilling

unread,
Jan 24, 2003, 5:14:14 AM1/24/03
to
In article <NZ3Y9.1866$c41....@news2.telusplanet.net>,
Harry <harryoo...@hotmail.co_> wrote:

>>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
>good reference.)

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 :-(

Thomas Dickey

unread,
Jan 24, 2003, 8:17:49 AM1/24/03
to
Harry <harryoo...@hotmail.co_> wrote:
> Bobby Higgins wrote...
>>
>>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?

> 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.

frequently.

> 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).

--
Thomas E. Dickey <dic...@radix.net> <dic...@herndon4.his.com>
http://dickey.his.com
ftp://dickey.his.com

0 new messages