Navigating multiples files vi editor
According to http://www.lagmonster.org/docs/vi2.html
the command :p
would make vi go to the previous file. Unfortunately, this isn't working for me. However :n
works and goes to the next page. What should I use to go to the previous file?
For :p
I get the message,
Hit Return to continue
and it stays in the same page. Thanks.
Edit:
I am sshing to an AIX box and using the vi in Ksh if that helps.
Edit 2:
Looks like rewinding to firs开发者_C百科t is possible with :rew
but listing all the files with :ar
results in the same message,
Hit Return to continue
May be this isn't possible at all from all the vi tutorials I've read so far including, http://www.bo.infn.it/alice/alice-doc/mll-doc/linux/vi-ex/node27.html
According to Vim's help, :N
(uppercase!) should be legal vi to go back a file:
:[count]n[ext] [++opt] [+cmd] *:n* *:ne* *:next* *E165* *E163* Edit [count] next file. This fails when changes have been made and Vim does not want to |abandon| the current buffer. Also see |++opt| and |+cmd|. {Vi: no count or ++opt}. :[count]N[ext] [count] [++opt] [+cmd] *:Next* *:N* *E164* Edit [count] previous file in argument list. This fails when changes have been made and Vim does not want to |abandon| the current buffer. Also see |++opt| and |+cmd|. {Vi: no count or ++opt}.
According to the vi manual page from AIX 5.2, this isn't possible:
Editing a List of Files: Enter the following subcommands in command mode. If you
need information about the format of vi subcommands, see ″vi General Subcommand
Syntax.″
:n Edits the next file in the list entered on the command line. If
you are using this subcommand from the ex editor, a : (colon) is
not needed.
:n Files Specifies a new list of files to edit. If you are using this
subcommand from the ex editor, a : (colon) is not needed.
Check the vi manual (man vi) on your system, maybe it's been updated in AIX 5.3.
Tried :bn, :bp ?
For posterity's sake user :prev or :previous
精彩评论