根据http://www.lagmonster.org/docs/vi2.html
命令:p
将使vi转到上一个文件。不幸的是,这对我不起作用。但是:n
有效并转到下一页。我应该用什么来转到上一个文件?
对于:p
,我收到了消息,
Hit Return to continue
它保持在同一页面。 感谢。
编辑:
我正在sshing到AIX盒子并在Ksh中使用vi,如果这有帮助的话。
编辑2:
看起来可以使用:rew
重新排到第一位,但列出:ar
的所有文件会产生相同的消息,
Hit Return to continue
到目前为止我读过的所有vi教程都可能无法实现这一点,包括: http://www.bo.infn.it/alice/alice-doc/mll-doc/linux/vi-ex/node27.html
答案 0 :(得分:2)
根据Vim's help,:N
(大写!)应该是合法的vi来返回文件:
:[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}.
答案 1 :(得分:1)
根据AIX 5.2的vi手册页,这是不可能的:
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.
检查系统上的vi手册(man vi),可能已在AIX 5.3中更新过。
答案 2 :(得分:0)
试过:bn,:bp?
答案 3 :(得分:0)
为了后人的用户:上一个或上一个