Pathogen 不加载插件

发布于 2024-09-12 12:58:35 字数 1419 浏览 4 评论 0原文

病原体对我不起作用。我遵循 Adam Lowe 在此处发布的提示 (还有更多)没有任何成功...

我的 vimrc:

filetype off
call pathogen#runtime_append_all_bundles()

filetype plugin indent on
set nocompatible
syntax on
set tabstop=2
set smarttab
set shiftwidth=2
set autoindent
set expandtab
set number
colorscheme darkblue

.vim 的内容 - ls .vim/*

.vim/autoload:
pathogen.vim

.vim/bundle:
nerdcommenter/  vim-haml/   vim-surround/
vim-endwise/    vim-rails/  vim-vividchalk/

捆绑包中的所有插件都是通过将它们从 GitHub 克隆到捆绑包目录中来安装的。

我尝试过病原体 1.1 和 1.2,甚至 GitHub 上的最新版本,但没有任何结果。 Vividchalk、Vim-rails 和 nerdcommenter 无法正常工作。我对其他插头的经验很少,所以我不确定它们,但我想它们也不起作用。

我使用的是ArchLinux,vim 7.2.385-1(不是最新的,因为最新的需要我安装ruby1.9,但它仍然是7.2)。它是通过 pacman - ArchLinux 包管理器安装的。除了使用病原体之外,没有以其他方式安装 vim 插件(我什至通过清理 /usr/share/vim 重新安装了 vim 软件包)。

我做错了什么?

编辑:

Pathogen does not work for me. I am following Adam Lowe's hints posted here (and few more) without any success...

My vimrc:

filetype off
call pathogen#runtime_append_all_bundles()

filetype plugin indent on
set nocompatible
syntax on
set tabstop=2
set smarttab
set shiftwidth=2
set autoindent
set expandtab
set number
colorscheme darkblue

Contents of .vim - ls .vim/*:

.vim/autoload:
pathogen.vim

.vim/bundle:
nerdcommenter/  vim-haml/   vim-surround/
vim-endwise/    vim-rails/  vim-vividchalk/

All plugins in bundle were installed by cloning them from GitHub into bundle directory.

I have tried with pathogen 1.1 and 1.2 and even the latest from GitHub without any result. Vividchalk, Vim-rails and nerdcommenter are not working. I have very little experience with other plugs so I am not sure about them, but I suppose they are not working too.

I am using ArchLinux, vim 7.2.385-1 (not the latest because the latest requires me to install ruby1.9, but it is still 7.2). It has been installed via pacman - ArchLinux package manager. No vim plugins were installed the other way than using pathogen (I have even reinstalled vim package with cleaning /usr/share/vim).

What am I doing wrong?

EDIT:

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(19

瑾兮 2024-09-19 12:58:55

我遇到了同样的问题,通过将此文件复制到 ~/.vim/autoload 解决:
https://github.com/sontek/dotfiles/blob/master /_vim/autoload/pathogen.vim

i had the same problem , solved by copying this file into ~/.vim/autoload:
https://github.com/sontek/dotfiles/blob/master/_vim/autoload/pathogen.vim

放我走吧 2024-09-19 12:58:53

我遇到了同样的问题,最终经过大量谷歌和调整 vimrc 文件,找到了解决方案。希望下面的代码片段能够解决这个问题。

<代码>
设置 nocp
source /home/ameet/.vim/autoload/pathogen.vim "我的 Pathogen.vim 的位置
调用病原体#infect()
调用病原体#helptags()

I was facing the same issue, finally after lot of google and tweaking the vimrc file, found the solution. Hope the following code snippet would resolve the issue.


set nocp
source /home/ameet/.vim/autoload/pathogen.vim "location of my pathogen.vim
call pathogen#infect()
call pathogen#helptags()

各空 2024-09-19 12:58:52

为了完整起见,我将添加此问题的解决方案。

我刚刚将 ~/.gvimrc 文件重命名为 ~/.vimrc,所有问题都解决了。我从 Linux 复制了 .vim 和 .gvimrc 并进行了此更改,一切都按预期工作。

For the sake of completion I'll add my solution for this problem.

I just renamed my ~/.gvimrc file to ~/.vimrc, and all my problems were solved. I literally copied my .vim and my .gvimrc from linux and did this change and everything works as expected.

回忆追雨的时光 2024-09-19 12:58:50

我也有同样的问题。我尝试了所有可能的组合。

最后我发现,如果我使用 mksession 保存我的 Vim 工作区并在 Vim 启动时加载它,它会使 Pathogen 无法加载我放入捆绑文件夹中的新插件。

安装新插件后,我现在总是删除会话文件并重新启动 Vim,并且每个插件都加载良好。

filetype off
set nocompatible
set laststatus=2
execute pathogen#infect()
syntax on
filetype plugin indent on

I had the same problem. I tried every possible combination.

Finally I found that if I use mksession to save my Vim workspace and have it load on Vim startup, it made pathogen not load new plugins I put into the bundle folder.

After installing a new plugin I now always delete my session file and start Vim fresh and every plugin loads fine.

filetype off
set nocompatible
set laststatus=2
execute pathogen#infect()
syntax on
filetype plugin indent on
鹿港巷口少年归 2024-09-19 12:58:47

就我而言,我克隆到文件夹 ~/dotfiles 但 vun 查找文件夹 ~/.vim,因此他没有携带任何插件或配色方案来解决我这样做的问题:

ln -s ~/.dotfiles ~/.vim

In my case I cloned to a folder ~/dotfiles but vun looks for a folder ~/.vim, as a result he carried no plugins or color schemes to solve the problem I did this:

ln -s ~/.dotfiles ~/.vim
鲜血染红嫁衣 2024-09-19 12:58:46

我把它放在我的里面:

安静!调用病原体#runtime_append_all_bundles()

I have it in mine as:

silent! call pathogen#runtime_append_all_bundles()

残花月 2024-09-19 12:58:46

在花了太长时间试图用 nerd-commenter/pathogen 解决这个问题之后,我崩溃了,只使用了 Debian 操作系统提供的 nerd-commenter 插件:

vim-addons install nerd-commenter

如果你使用 Debian 并且需要重新开始工作,请尝试一下。如果您还没有安装“vim-addon-manager”和“vim-scripts”软件包,您可能需要从 apt 安装它们。

After spending waaaay too long trying to solve this problem with nerd-commenter/pathogen, I broke down and just used Debian's OS provided nerd-commenter plugin:

vim-addons install nerd-commenter

If you're on Debian and need to get back to work, try it out. You probably need "vim-addon-manager" and "vim-scripts" packages installed from apt if you don't have it already.

带刺的爱情 2024-09-19 12:58:45
set nocp
call pathogen#infect()
syntax on
filetype plugin indent on
call pathogen#infect()

上面的内容帮助我解决了这个问题,无法对其他人发表评论,但是感谢您发布上面的代码。

set nocp
call pathogen#infect()
syntax on
filetype plugin indent on
call pathogen#infect()

The above helped me fix the issue, can't leave a comment on other peoples however thank you for posting the code above.

在你怀里撒娇 2024-09-19 12:58:44

我在 Ubuntu 上也遇到了同样的问题。日志是:

linha 4: executando "/usr/share/vim/vim73/ftoff.vim"
Erro detectado ao processar /usr/share/vim/vim73/ftoff.vim:
linha   11:
E216: Grupo ou evento inexistente: filetypedetect *
fim da execução de /usr/share/vim/vim73/ftoff.vim

解决方案是在文件 /usr/share/vim/vim73/ftoff.vim 的末尾添加“\n”以正确执行它。

I was having the same problem with Ubuntu. The log was:

linha 4: executando "/usr/share/vim/vim73/ftoff.vim"
Erro detectado ao processar /usr/share/vim/vim73/ftoff.vim:
linha   11:
E216: Grupo ou evento inexistente: filetypedetect *
fim da execução de /usr/share/vim/vim73/ftoff.vim

The solution was to add "\n"s at the end from file /usr/share/vim/vim73/ftoff.vim to execute it properly.

违心° 2024-09-19 12:58:43

我使用了 callpathogen#infect('~/.vim/bundle') 而不是 callpathogen#runtime_append_all_bundles(),它对我有用。

Instead of call pathogen#runtime_append_all_bundles(), I used call pathogen#infect('~/.vim/bundle') and it worked for me.

挽心 2024-09-19 12:58:42

尝试使用命令检查您的运行时路径:
:设置运行时路径?
第一个条目应该类似于 ~/.vim。

我不加载插件/病原体的问题是我将 vim 环境放置在 ~/.dotfiles/vim 中,我的 vimrc 和其余内容(插件等)所在的位置。
在 ~/.vimrc 中创建到 ~/.dotfiles/vim/vimrc 的符号链接后,我忘记创建第二个符号链接 ~/.vim -> ~/.dotfiles/vim/ 这导致 vim 感到困惑,因为他正在 ~/.vim (默认)中寻找东西。在我制作了正确的符号链接后,所有内容都弹出在正确的位置。

我希望它能帮助像我一样忘记第二个符号链接的人;-)

Try to check your runtime path using command:
:set runtimepath?
First entry should be something like ~/.vim.

My problem with not loading plugins/pathogen was that i placed my vim environment in ~/.dotfiles/vim where my vimrc and rest of the stuff (plugins etc.) lives.
After creating symlink to ~/.dotfiles/vim/vimrc in ~/.vimrc i forgot to make second symlink ~/.vim -> ~/.dotfiles/vim/ which caused vim to be confused cause he was looking for stuff in ~/.vim (default). After i made proper symlink everything poped in right place.

I hope it will help someone who forgot about second symlink like I did ;-)

夜吻♂芭芘 2024-09-19 12:58:41
filetype off                                                                
call pathogen#runtime_append_all_bundles()
call pathogen#helptags()
filetype off                                                                
call pathogen#runtime_append_all_bundles()
call pathogen#helptags()
一百个冬季 2024-09-19 12:58:40

通过 github 提出问题后由 (mattn & tpope) 修复,

set nocp
call pathogen#infect()
syntax on
filetype plugin indent on
call pathogen#infect()

请参阅 https:/ /github.com/tpope/vim-pathogen/issues/50#issuecomment-3137909

Fixed by (mattn & tpope) after raising issue via github

set nocp
call pathogen#infect()
syntax on
filetype plugin indent on
call pathogen#infect()

see https://github.com/tpope/vim-pathogen/issues/50#issuecomment-3137909

恰似旧人归 2024-09-19 12:58:40

我的环境是Vim 7.3.35和Ubuntu 11.04。

我花了一些时间试图解决它。我克隆项目 https://github.com:r00k/dotfiles 并按照说明进行安装。

当启动 vi 时,得到了这样的评论

E117:未知功能:pathogen#runtime_append_all_bundles

及解决方案:

文件类型关闭

调用病原体#runtime_append_all_bundles()

文件类型

不起作用。

我在我的主目录中发现了 .vim 符号链接,但没有正确设置。安装脚本创建了一个 .vim 目录,其中有一个符号链接 vim 指向我的 .dotfiles/vim。解决方案是删除 .vim 目录并创建一个指向 .dotfiles/vim 的符号链接 .vim

A 还在我的 .vimrc 中关闭/打开文件类型。

My environment is Vim 7.3.35 and Ubuntu 11.04.

I spent some time trying to resolve it. I clone the project https://github.com:r00k/dotfiles and follow the instructions to install.

When started vi a got the so commented

E117: Unknown function: pathogen#runtime_append_all_bundles

and the solution:

filetype off

call pathogen#runtime_append_all_bundles()

filetype on

did not work.

I found the .vim symlink in my home directory where no properly set. The install script made a .vim DIRECTORY with a symlink vim inside of it pointing to my .dotfiles/vim. The solution was to delete the .vim directory and make a symlink .vim pointing .dotfiles/vim.

A kept the filetype off/on in my .vimrc also.

紅太極 2024-09-19 12:58:39

也许 Arch 的默认 vimrc (可能是 /etc/vim/vimrc)与 Pathogen 不能很好地配合。尝试在不加载配置文件的情况下启动 Vim:

vim -u NONE

然后从 vim 中加载 vimrc:

:so ~/.vimrc

那么插件可以工作吗?

Maybe Arch's default vimrc (possibly /etc/vim/vimrc) doesn't play well with Pathogen. Try starting Vim without loading config files:

vim -u NONE

and then load your vimrc from within vim:

:so ~/.vimrc

Do the plugins work then?

吃素的狼 2024-09-19 12:58:38

如果您的 .vim 基于 git 存储库和子模块,请记住在克隆存储库后运行 git submodule init 和 git submodule update 。即

git submodule init
git submodule update

我遇到了同样的错误并尝试了上述所有方法,但它不起作用。直到我初始化并更新了 git 子模块。

希望这对遇到类似错误的人有所帮助。

If your .vim is based on a git repo and submodules, DO REMEMBER to run git submodule init and git submodule update after cloning the repo. i.e.

git submodule init
git submodule update

I had the same error and tried all of the above, but it didn't work. Until I initialized and updated the git submodules.

Hope this helps for anyone who has a similar error.

变身佩奇 2024-09-19 12:58:37

这似乎是由某些发行版中的“系统”vimrc 在设置病原体之前设置 filetype on 引起的常见问题。因此,将其关闭并再次打开会强制插件正确加载:

 call pathogen#runtime_append_all_bundles()
 filetype off
 syntax on
 filetype plugin indent on

更多信息 这里

This seems to be common problem caused by the "system" vimrc in some distributions setting filetype on before you set up pathogen. So turning it off and back on again forces plugins to load correctly:

 call pathogen#runtime_append_all_bundles()
 filetype off
 syntax on
 filetype plugin indent on

More info here.

も让我眼熟你 2024-09-19 12:58:37

我也有类似的问题。 Pathogen 正在加载我的一些插件,但不是全部。
经过一番摆弄和思考后,我发现(我不知道文档中是否提到)在每个 bundle/'plugin_name' 文件夹中,应该有另一个名为 plugin 的文件夹> 包含 *.vim 文件。

然后,当 vim 启动时,将不在捆绑包中查找,而是在捆绑包内包含名为插件的文件夹的文件夹中查找,并将创建其他文件夹(在每个插件文件夹中)。

因此,如果插件只是一个 .vim 文件,请为其创建一个文件夹...

而不是:

~/.vim/bundle/vimexplorer/vimExplorer.vim

您需要:

~/.vim/bundle/vimexplorer/plugin/vimExplorer.vim

一切都像魅力一样。

I was having a similar problem. Pathogen was loading some of my plugins while not all of them.
After some fiddling and wondering I discovered (I don't know if it's mentioned in the documentation) that in each bundle/'plugin_name' folder, there should be another folder called plugin that contains the *.vim file.

Then, when vim starts will look, not in bundle, but in those folders within bundle that contain a folder called plugin... and will create other folders (in each plugin folder).

So, if the plugin is just a .vim file make a folder for it...

instead of:

~/.vim/bundle/vimexplorer/vimExplorer.vim

you need:

~/.vim/bundle/vimexplorer/plugin/vimExplorer.vim

And everything works like a charm.

荒芜了季节 2024-09-19 12:58:37

我在加载特定插件时遇到问题:特别是带有 plugin 子目录的插件。例如,在新安装的 MacVim 上,~/.vim/bundle/surround/plugin/surround.vim 中的插件没有被加载,即使 ~/.vim/bundle /surround 出现在 :scriptnames 的输出中。

问题是我在 .gvimrc 中加载 Pathogen,而不是 .vimrc。无论出于何种原因,如果您这样做,.vim/bundle/*/plugin 子目录中的内容将不会加载,因此请在 .vimrc 中执行!

我已经在 github 上打开了一个问题——我不知道它是否可以工作如果它是从 .gvimrc 加载的,但是对于像我这样的白痴来说,文档中至少应该有某种警告。

I've had problems loading particular plugins: specifically, plugins with a plugin subdirectory. For example, on a fresh MacVim install, a plugin in ~/.vim/bundle/surround/plugin/surround.vim wasn't being loaded, even though ~/.vim/bundle/surround appeared in the output of :scriptnames.

The problem was that I was loading Pathogen in .gvimrc, not .vimrc. For whatever reason, stuff in .vim/bundle/*/plugin subdirectories won't load if you do that, so do it in .vimrc!

I've opened an issue on github—I don't know if it can be made to work even if it loads from .gvimrc, but there should at least be some sort of warning in the documentation for idiots like me.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文