10

我刚刚安装了 MacVim(并覆盖了 Vim)。我正在努力让 Pathogen 发挥作用。当我启动 Vim 时,我收到以下错误:

Error detected while processing /Users/nir/.vim/autoload/pathogen.vim:
line    1:
E477: No ! allowed: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
line    2:
E488: Trailing characters: <html><head>
line    3:
Press ENTER or type command to continue

E488: Trailing characters: <title>302 Found</title>
line    4:
E488: Trailing characters: </head><body>
line    5:
E488: Trailing characters: <h1>Found</h1>
line    6:
E488: Trailing characters: <p>The document has moved <a href=
line    7:
E488: Trailing characters: <hr>
line    8:
E488: Trailing characters: <address>Apache/2.2.22 (Debian) Server at tpo.pe Port 443</address>
line    9:
E488: Trailing characters: </body></html>
line    1:
E477: No ! allowed: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
line    2:
E488: Trailing characters: <html><head>
line    3:
E488: Trailing characters: <title>302 Found</title>
line    4:
E488: Trailing characters: </head><body>
line    5:
E488: Trailing characters: <h1>Found</h1>
line    6:
E488: Trailing characters: <p>The document has moved <a href=
line    7:
E488: Trailing characters: <hr>
line    8:
E488: Trailing characters: <address>Apache/2.2.22 (Debian) Server at tpo.pe Port 443</address>
line    9:
E488: Trailing characters: </body></html>
Error detected while processing /Users/nirchernia/.vimrc:
line    1:
E117: Unknown function: pathogen#infect
E15: Invalid expression: pathogen#infect()

我的 .vimrc 看起来像这样

execute pathogen#infect()
syntax on
filetype plugin indent on

我的目录看起来像这样

~/
  .vimrc
  .vim
     autoload
       pathogen.vim
     bundle
       nerdtree
  .viminfo
4

3 回答 3

33

看起来您是pathogen.vim直接从浏览器中复制的,其中包含所有 HTML 标记。

尝试运行以下命令,然后重试 -

curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim

更多关于病原体安装的信息。

于 2015-06-08T16:48:11.977 回答
1

已经发布(并已接受)的答案可能对于最初的问题是正确的。

今天我遇到了同样的问题,但接受的答案并没有解决它。经调查,该资源似乎已移动(可能是暂时的)并且现在位于无效的 SSL 证书后面。

这对我有用:

curl --insecure -LSso ~/.vim/autoload/pathogen.vim https://raw.githubusercontent.com/tpope/vim-pathogen/master/autoload/pathogen.vim
于 2017-09-11T14:31:38.783 回答
0

我有同样的问题“Ubuntu 16.04”

而这个解决方案: https ://github.com/tpope/vim-pathogen/issues/50

.vimrc:

set nocp " set rtp+=/path/to/rtp/that/included/pathogen/vim " if needed call pathogen#infect() syntax on filetype plugin indent on

于 2018-06-10T09:26:03.040 回答