From owner-freebsd-questions@FreeBSD.ORG Sat Nov 15 15:34:02 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 82E8516A4CE for ; Sat, 15 Nov 2003 15:34:02 -0800 (PST) Received: from quipo.it (mx.quipo.it [212.43.108.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id C5C9443F85 for ; Sat, 15 Nov 2003 15:34:00 -0800 (PST) (envelope-from brunoc@quipo.it) Received: from computer [62.94.195.13] by quipo.it with ESMTP (SMTPD32-7.15) id A7E470F700C2; Sun, 16 Nov 2003 00:33:56 +0100 Message-ID: <047701c3abcf$45647fa0$0dc35e3e@computer> From: "Brunoc@quipo.it" To: "Konrad Heuer" References: <20031111130544.F28128@gwdu60.gwdg.de> Date: Sat, 15 Nov 2003 23:15:38 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Declude-Sender: brunoc@quipo.it [62.94.195.13] X-Declude-Spoolname: Db7e470f700c2498d.SMD cc: freebsd-questions@freebsd.org Subject: Re: newbie: vi - go to previous file X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Nov 2003 23:34:02 -0000 X-List-Received-Date: Sat, 15 Nov 2003 23:34:02 -0000 On Tuesday, November 11, 2003, Konrad Heuer wrote: >On Tue, 11 Nov 2003, Zhang Weiwu wrote: > >>Hello. I am using the BSD's vi not vim. >> >>I learned from :exusage that :N is to swich to the next file in = argument >>list while :P swich to the previous file. :N woks fine, while :P does >>nothing. >> >>say, I run ">vi file1 file2", which opens file1, :N begin to edit = file2, >>then I press :P, I thought I should go to file1, but I'm still editing >>file2. >try :prev - :p seems to be an abbreviation for a different command. > >Regards Konrad Heuer (kheuer2@gwdg.de) ____ ___ _______ When you edit multiple files in vi, (whether you start from the command line like "vi file1 file 2. . . ",=20 or by starting vi with a single file or with no file argument at all,=20 in which case you can load a file from inside the vi with the=20 vi command ':n '), you can cycle from a file to the next=20 (and when you are at the last,you restart with=20 the first and so on,like in a "ring")=20 inside the editor with the command ':n#' (yes, ":n#") Cheers Bruno --- [Quipo ISP - Questa E-mail e' stata controllata dal programma Declude Virus] [Quipo ISP - This E-mail was scanned for viruses by Declude Virus]