如何在vim中打开我的旧文件列表中的文件?
在vim中,我可以键入如何在vim中打开我的旧文件列表中的文件?,vim,Vim,在vim中,我可以键入:oldfiles查看我以前编辑过的文件列表。太棒了 但是现在我想打开列表中的一个或多个文件到缓冲区中。如何执行此操作?如果使用:help oldfiles,您将找到命令:browse oldfiles,该命令可以执行您想要的操作 :bro[wse] ol[dfiles][!] List file names as with |:oldfiles|, and then prompt
:oldfiles
查看我以前编辑过的文件列表。太棒了
但是现在我想打开列表中的一个或多个文件到缓冲区中。如何执行此操作?如果使用
:help oldfiles
,您将找到命令:browse oldfiles
,该命令可以执行您想要的操作
:bro[wse] ol[dfiles][!]
List file names as with |:oldfiles|, and then prompt
for a number. When the number is valid that file from
the list is edited.
If you get the |press-enter| prompt you can press "q"
and still get the prompt to enter a file number.
Use ! to abandon a modified buffer. |abandon|
{not when compiled with tiny or small features}
一旦你在列表的底部,你应该按下
:
并发出一个命令,使用这个“奇怪的”符号:
:command #<91
要编辑条目18、42和93,请使用:
:args #<18 #<42 #<93
:args#不错!有没有办法一次打开多个文件?比如说2,3,4
或2-4
?@Freedom\u Ben,我不知道有一个,但你可以用vimscript写一个。更简单的是,只需在列表中输入一个数字即可进行编辑file@AlexShwarc,:浏览旧文件
,如接受的答案所示,这样做,但它比普通的:oldfiles
灵活得多。
:args #<18 #<42 #<93