Pathogen (Vim) 非默认包目录位置
我喜欢将所有 Vim 插件和 vimrc 保存在 Dropbox 中。我也喜欢病原体。查看pathogen.vim 文件,似乎我可以为pathogen#infect() 函数提供我的包文件夹的替代位置。但这是行不通的。我到处寻找解决方案,但我所做的一切都不允许我将病原体的“工作目录”更改为“~/Dropbox/Vim/GlobalRuntimePath/bundle”。我尝试直接在我的 vimrc 中获取Pathogen.vim,但没有成功。 Pathogen 不会抱怨,只有我的 vimrc 当它尝试调用插件中的函数时,当我删除它们的本地副本时,这些插件不再存在。
我问错问题了吗?
I like the idea of keeping all my Vim plugins and my vimrc in Dropbox. I also love pathogen. Looking at the pathogen.vim file, it seems I can provide the pathogen#infect() function with an alternative location for my bundle folder. But this just doesn't work. I've searched high and low for a solution, but nothing I do will allow me to change the 'working directory', as it were, for pathogen to '~/Dropbox/Vim/GlobalRuntimePath/bundle'. I've tried sourcing pathogen.vim directly in my vimrc, to no avail. Pathogen doesn't complain, just my vimrc when it tries to call upon functions from plugins that no longer exists when I remove their local copies.
Am I asking the wrong questions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有一种方法可以添加自定义捆绑目录
病原。首先,应该将路径附加到包含以下内容的目录
额外的包到
runtimepath
选项:然后,当在
.vimrc
文件中加载 Pathogen 时,应该指定所有捆绑包目录的名称(它们必须具有相同的目录)作为
runtime_append_all_bundles
调用的参数:如果默认情况下将包目录命名为
bundle
,则该参数可以被省略。
There is a way for adding custom bundle directories provided in
Pathogen. First, one should append paths to the directories containing
additional bundles to the
runtimepath
option:Then, when loading Pathogen in
.vimrc
file, one should specify thename of all bundle directories (they must have the same one) as the
argument to the
runtime_append_all_bundles
call:If bundle directories are named by default,
bundle
, the argument canbe omitted.