如何有效地在Vim中处理多个文件?

允我心安 提交于 2020-08-10 21:07:59

问题:

I've started using Vim to develop Perl scripts and am starting to find it very powerful. 我已经开始使用Vim开发Perl脚本,并且开始发现它非常强大。

One thing I like is to be able to open multiple files at once with eg vi main.pl maintenance.pl and then hop between them with: 我喜欢的一件事是能够使用vi main.pl maintenance.pl例如一次打开多个文件,然后使用以下命令在它们之间跳转:

:n
:prev

and see which file are open with 并查看打开哪个文件

:args

And to add a file, I can say: 要添加文件,我可以说:

:n test.pl

which I expect would then be ADDED to my list of files, but instead it wipes out my current file list and when I type :args I only have test.pl open. 我希望它将添加到我的文件列表中,但是它将清除当前文件列表,当我键入:args我只打开了test.pl

So how can I ADD and REMOVE files to my args list? 那么如何将文件添加和删除到我的args列表中?


解决方案:

参考一: https://stackoom.com/question/DxY/如何有效地在Vim中处理多个文件
参考二: https://oldbug.net/q/DxY/How-to-effectively-work-with-multiple-files-in-Vim
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!