newbie: vi - go to previous file

Brunoc at brunoc at
Sat Nov 15 15:34:02 PST 2003

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
>>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

>try :prev - :p seems to be an abbreviation for a different command.

Konrad Heuer (kheuer2 at  ____            ___  _______

When you edit multiple files in vi,
(whether you start from the command line like "vi file1 file 2. . . ", 
or by starting vi with a single file or with no file argument at all, 
in which case you can load a file from inside the vi with the 
vi command ':n <file_to_load>'),
you can cycle from a file to the next 
(and when you are at the last,you restart with 
the first and so on,like in a "ring") 
inside the editor with the command ':n#' (yes, ":n#")



[Quipo ISP - Questa E-mail e' stata controllata dal programma Declude Virus]
[Quipo ISP - This E-mail was scanned for viruses by Declude Virus]

More information about the freebsd-questions mailing list