Jon Nelson on Mon, 27 Aug 2001 19:30:17 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] how to prevent vi clear the screen


Not sure I quite understand what you are trying to accomplish, but...
You could just execute the command from within vi ie, :!<command>.

At 01:15 PM 8/27/01 -0400, you wrote:
> what I meant is I want vi to retain what it views on the
> screen just before I exit--I want to retain on the screen
> what vi is editing.
>
> When I have just one terminal and I want to see the contents
> of a file, I have this bad habit of VI'ing a file and
> positioning the text just so that when I quit vi whatever
> file I am editing is still there showing up on the
> screen, and I am ready for my next command...
> saves me the trouble of writing down or memorizing stuff
> written in text files.
>
> only in linux, vi replaces the screen with something else--
> clears it up or restores the old contents.

In vim (most likely the editor that comes with Linux), try:

  ":help save-screen"


According to the help file, and a little experimentation, adding this to your .vimrc:

  set t_ti= t_te=


Seems to do the trick.


Kyle

--

------------------------------------------------------------------------------
Student:       "I am very discouraged.
                What should I do?"
Soen Nakagwa: "Encourage others."
mortis@voicenet.com                            http://www.voicenet.com/~mortis
------------------------------------------------------------------------------


______________________________________________________________________ Philadelphia Linux Users Group - http://www.phillylinux.org Announcements-http://lists.phillylinux.org/mail/listinfo/plug-announce General Discussion - http://lists.phillylinux.org/mail/listinfo/plug

*************NOTE NEW NEW ALT. EMAIL!!!!******************

Trooper Jon S. NELSON, LCA
Pennsylvania State Police
Computer Crimes Unit
Office:  610-344-4471
Page:  866-284-1603 (Toll Free)
Nextel:  610-637-0707 (Private ID 8777)
Alt. email:  jonelson@state.pa.us <------------------------
             __()___
            /    |       \
  _____/___|_____\______
 /    __           (-)         __   \
/__/    \____________/    \__\
     \__/                     \__/

...for those of you at a console, it's a police car.


______________________________________________________________________ Philadelphia Linux Users Group - http://www.phillylinux.org Announcements-http://lists.phillylinux.org/mail/listinfo/plug-announce General Discussion - http://lists.phillylinux.org/mail/listinfo/plug