Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Nov 2003 23:15:38 +0100
From:      "Brunoc@quipo.it" <brunoc@quipo.it>
To:        "Konrad Heuer" <kheuer2@gwdg.de>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: newbie: vi - go to previous file
Message-ID:  <047701c3abcf$45647fa0$0dc35e3e@computer>
References:  <LAW11-F17v4ucOK05sd000340e3@hotmail.com> <20031111130544.F28128@gwdu60.gwdg.de>

next in thread | previous in thread | raw e-mail | index | archive | help


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 <file_to_load>'),
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]



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?047701c3abcf$45647fa0$0dc35e3e>