gvim 病原体问题 [英] gvim pathogen issues

查看:25
本文介绍了gvim 病原体问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从 github 下载了 pathogen.vim 并将其放在 ~/.vim 下的autoload"目录中.但是现在当我启动 gvim 并执行 :helptags 时,它会显示需要参数".我的 ~/.vimrc 文件的内容是:

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()

我错过了什么?

谢谢.

安迪

PS:我这样做是为了安装 Nerdtree

PS: I am doing this so that I can install Nerdtree

--- 编辑 1 ---

--- EDIT 1 ---

根据我目前所见,来自 github 的 pathogen.vim 插件对我不起作用,所以我不得不从 vim.org 下载它,它起作用了.但是现在当我执行unzip nerd_tree -d ~/.vim/bundle"然后启动 gvim 时,我仍然找不到 nerdtree.

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 ---------

推荐答案

helptags 是一个 vim 命令,与病原体无关.vim 中的 helptags 命令将一个目录作为参数,它将处理 .txt 文件并生成标签文件.

helptags is a vim command which has nothing to do with pathogen. The helptags command in vim takes a directory as an argument where it will process .txt files and generate the tags file.

要判断病原体是否正确加载,您应该能够尝试:call pathogen#helptags().如果手动运行没有失败,那么病原体被加载(如果你在启动 vim 时没有收到错误,这实际上是不必要的,因为你的 .vimrc 已经在运行这些命令).

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/.这可能包含许多文件和目录(ftplugin、autoload、doc 等).
  • 启动 vim 并测试 plugin-name 提供的功能是否可用.如果没有,请检查您是否已正确完成上述步骤.
  • Make a directory called ~/.vim/bundle
  • Unzip/clone/copy files from an upstream source into ~/.vim/bundle/plugin-name/. This may contain many files and directories (ftplugin, autoload, doc, etc.).
  • Fire up vim and test that the functionality provided by plugin-name is available. If not, check that you have completed the above steps correctly.

如果您遇到病原体问题,请记住安装包与以正常方式安装插件没有什么不同.优点是您可以将与该特定插件相关的所有文件和文件夹保存在它们自己的目录中.这允许您单独管理每个插件并确信您只接触与该插件相关的文件.

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.

这篇关于gvim 病原体问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆