Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site astrovax.UUCP
Path: utzoo!watmath!clyde!floyd!harpo!ulysses!allegra!princeton!astrovax!wls
From: wls@astrovax.UUCP (William L. Sebok)
Newsgroups: net.unix
Subject: Re: "Toggling file names in vi"
Message-ID: <248@astrovax.UUCP>
Date: Wed, 21-Mar-84 16:57:07 EST
Article-I.D.: astrovax.248
Posted: Wed Mar 21 16:57:07 1984
Date-Received: Thu, 22-Mar-84 02:28:24 EST
References: <710@houxz.UUCP>, <994@ihuxr.UUCP> <344@houxu.UUCP>
Organization: Princeton Univ. Astrophysics
Lines: 22

A great example of the use of toggling file names in vi is the use of the
two files accessed by vi after a  a (r)eply or (f)ollowup command from vnews.
The first file is the temporary file which will become your reply/followup.
To read this article file into your reply/followup temporary file give these
commands.

:n			To go to the article file

:e #			To go back to the temporary file

:$r #			Read the article file into the original file.

Now one has a temporary file which contains a copy of the original article.
One can then edit it down to shape.

I felt a great sense of accomplishment when I first figured this out. 
Unfortunately vi has no direct command (I am aware of) to read the "next" file.
Thus the trick of going to the article file and back to the temporary file to
make the article file the "previous" file.
-- 
Bill Sebok			Princeton University, Astrophysics
{allegra,akgua,burl,cbosgd,decvax,ihnp4,kpno,princeton,vax135}!astrovax!wls