gvim 病原体问题
我从github下载了pathogen.vim并将其放在~/.vim下的“autoload”目录中。然而现在当我启动 gvim 并执行 :helptags 时,它说“需要参数”。我的 ~/.vimrc 文件的内容是:
call pathogen#runtime_append_all_bundles()
call pathogen#helptags()
我缺少什么?
谢谢。
Andy
PS:我这样做是为了安装 Nerdtree
--- 编辑 1 ---
根据我到目前为止所看到的,github 上的 Pathogen.vim 插件对我不起作用,所以我必须从vim.org,它成功了。然而现在当我执行“unzip nerd_tree -d ~/.vim/bundle”然后启动gvim时,我仍然找不到nerdtree。
- - -结尾 - - - - -
I downloaded pathogen.vim from github and put it in "autoload" directory under ~/.vim. However now when I fire up gvim, and do :helptags, it says "Argument required". The contents of my ~/.vimrc file are:
call pathogen#runtime_append_all_bundles()
call pathogen#helptags()
What am I missing?
Thanks.
Andy
PS: I am doing this so that I can install Nerdtree
--- EDIT 1 ---
Based on what I have seen so far, the pathogen.vim plugin from github did not work for me, so I had to download it from vim.org, and it worked. However now when I do "unzip nerd_tree -d ~/.vim/bundle" and then start up gvim, I can still not find nerdtree.
-----End ---------
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
根据github站点上的病原体README,您应该使用
:Helptags
而不是:helptags
。执行:Helptags
命令后,pathogen 现在应该生成~/.vim/bundle
目录下的所有文档。According to the pathogen README on github site, you should use
:Helptags
instead of:helptags
. With:Helptags
command executed, pathogen should generate all the documentations under directory~/.vim/bundle
now.helptags
是一个vim命令,与病原体无关。 vim 中的helptags
命令将目录作为参数,它将在其中处理 .txt 文件并生成标签文件。要判断病原体是否正确加载,您应该能够尝试
:调用pathogen#helptags()
。如果手动运行没有失败,那么病原体就会被加载(如果你在启动 vim 时没有收到错误,这实际上是不必要的,因为你的.vimrc
已经在运行这些命令)。您需要完成的下一步是阅读此处提供的文档如何将插件安装为捆绑包。总结一下:
~/.vim/bundle
的目录,~/.vim/bundle/plugin-name/
中。这可能包含许多文件和目录(ftplugin、autoload、doc 等)。如果您遇到病原体问题,请记住安装捆绑包与以正常方式安装插件没有什么不同。优点是您可以将与该特定插件相关的所有文件和文件夹保存在自己的目录中。这使您可以单独管理每个插件,并确信您只触及与该插件相关的文件。
helptags
is a vim command which has nothing to do with pathogen. Thehelptags
command in vim takes a directory as an argument where it will process .txt files and generate the tags file.To tell if pathogen is loading correctly you should be able to attempt to
:call pathogen#helptags()
. If running that manually does not fail, then pathogen is loaded (this is actually unnecessary if you are not getting an error when you start vim because your.vimrc
is already running these commands).The next step for you to complete is to read the documentation provided here on how to install a plugin as a bundle. To summarize:
~/.vim/bundle
~/.vim/bundle/plugin-name/
. This may contain many files and directories (ftplugin, autoload, doc, etc.).If you're having problems with pathogen, just remember installing a bundle is not all that different than installing a plugin the normal way. The advantage is you get to keep all files and folders related to that specific plugin in their own directory. This allows you to manage each plugin individually and be confident you are only touching files related to that plugin.
我使用病原体,我发现它很棒,但使用 NERDTree 根本不需要病原体。
只需像这样放置文件,然后发出
:helptags ~/.vim/doc
,它就会起作用:我对病原体的设置非常标准:
并且效果很好。
它有帮助,这是我的
~/.vimrc
的第一行:I use pathogen and I find it great, but you don't need pathogen at all to use NERDTree.
Just put the files like this then issue
:helptags ~/.vim/doc
and it will work:My setup with pathogen is very standard:
and works like a charm.
It it helps, here are the first lines of my
~/.vimrc
: