未知功能:病原体#infect

Apa*_*ear 7 vim nerdtree pathogen

我刚安装了MacVim(并覆盖了Vim).我正在努力让病原体发挥作用.当我启动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()
Run Code Online (Sandbox Code Playgroud)

我的.vimrc看起来像这样

execute pathogen#infect()
syntax on
filetype plugin indent on
Run Code Online (Sandbox Code Playgroud)

我的目录看起来像这样

~/
  .vimrc
  .vim
     autoload
       pathogen.vim
     bundle
       nerdtree
  .viminfo
Run Code Online (Sandbox Code Playgroud)

ron*_*akg 27

您似乎pathogen.vim直接从浏览器复制了该浏览器,其中包含所有HTML标记.

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

curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
Run Code Online (Sandbox Code Playgroud)

更多关于病原体安装.

  • 取决于您如何复制文件.很可能你是从浏览器中显示文件的页面中选择了所有文件,并使用了一些语法高亮显示等. (2认同)