vim doesn't preserve the terminal content

Pieter de Goeje pieter at
Fri Nov 2 16:14:25 PDT 2007

On Friday 02 November 2007, Jerry McAllister wrote:
> On Fri, Nov 02, 2007 at 02:29:47PM -0700, Yuri wrote:
> > I use vim both on Linux and FreeBSD.
> > On Linux after I exit vim original screen content is restored.
> > On FreeBSD vim leaves the last content viewed in vim.
> >
> > How do I make vim preserve the screen?
The easiest way is to use a terminal with standard support for alternate 
screens, like rxvt.
> I don't know how to do that, but it is one Lunix (bash?) feature
> that I hate and would like to know how to change it to function
> the way it does under FreeBSD (tcsh).
This has to do with the terminal capability strings ti and te. Xterm and the 
FeeBSD console don't have them defined in /etc/termcap (or they are empty). I 
don't know if syscons even supports alternate screens.

Here is some (linux specific) info about it:

Hope this helps,
Pieter de Goeje

More information about the freebsd-questions mailing list