我正在尝试使用 VIM 进行一些编程。我是 VIM 的初学者。你们能帮我弄清楚项目插件吗
我无法理解文档。如果你使用过这个插件,你能告诉我入门的基本步骤吗?
我正在尝试使用 VIM 进行一些编程。我是 VIM 的初学者。你们能帮我弄清楚项目插件吗
我无法理解文档。如果你使用过这个插件,你能告诉我入门的基本步骤吗?
为了配置项目插件,您必须编辑 .vimprojects 文件。帮助中给出了一个例子
:help project-example
如您所见,您必须编写类似这样的内容
Name_of_project = path/to/your/project CD=. flags=flags_you_want{
file1
file2
...
Name_of_Subcategory = path/to/your/subcategory filter=files_you_want{
subcategory_file1
subcategory_file2
...
}
}
现在您可以调用您的项目:
:Project
这将打开一个带有您刚刚配置的文件的垂直窗口。单击您添加的任何文件以将其打开。
对于标志和过滤器,所有内容都在帮助文件中进行了解释。还有其他的微妙之处你必须自己去发现。我希望这能帮到您。
You can also have the plugin generate the file for you: invoke :Project
in normal mode, and then hit \C
which will prompt you for the name of the project, the directory of the project (i.e., ~/Projects/Foobar if ~/Projects/Foobar contains all your code, et cetera), the cd
parameter (always the same as the directory, for me) and a standard file filter (*.cpp
or what have you).
You can then write this projects file out with :w filename
and load it later on.