Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!haven!vrdxhq!grebyn!macom1!larry From: larry@macom1.UUCP (Larry Taborek) Newsgroups: comp.editors Subject: Re: Vi question Message-ID: <4950@macom1.UUCP> Date: 16 Oct 89 11:22:43 GMT References: <1494@bnlux0.bnl.gov> Organization: CENTEL Federal Systems, Reston, VA. 22091-1506 Lines: 32 From article <1494@bnlux0.bnl.gov>, by como@max.bnl.gov (Andrew T. Como): > > I have a question about "vi"...If you are editing > a file and want to look at another file (just for reference) > is there a way? > > I have tried ":r filename" and it appends the filename to > the original file. Try ":!{cat,more,pg,head,tail} filename" It will list the file on your screen and then let you continue to edit your file. > > Also how can I keep switching from file1 to file2 without > "setting autowrite". > You can edit multiple files in a single vi session just by starting it with multiple file names as arguments like. vi filename1 filename2 filename3... Then you can switch to the next with the :n command, but you MUST write the file you are editing before moving on to the next or you will loose your editing changes. Hope this helps... -- Larry Taborek ..!uunet!grebyn!macom1!larry Centel Federal Systems larry@macom1.UUCP 11400 Commerce Park Drive Reston, VA 22091-1506 My views do not reflect those of Centel 703-758-7000