12

I just installed MacVim (and did an override of Vim). And I am trying to get Pathogen to work. When I start Vim, I get the following error:

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

My .vimrc looks like this

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

And my directory looks like this

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

3 Answers 3

39

Looks like you copied the pathogen.vim directly from the browser, which has all the HTML tags in it.

Try running following command and try again -

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

More on pathogen installation.

5
  • 1
    Thank you this worked, although I am confused why it pulled the HTML tags?
    – ApathyBear
    Commented Jun 8, 2015 at 16:50
  • 2
    Depends on how you copied the file. Most likely you did select all from a page where the file was shown with some syntax highlighting etc in browser.
    – ronakg
    Commented Jun 8, 2015 at 16:51
  • This worked for me when an update script borked my pathogen installation. Reinstall!
    – bloke_zero
    Commented Sep 15, 2015 at 15:18
  • check if you are behind proxy when executing the curl. If you could not download it, just copy manually and paste it in autoload directory Commented Jun 29, 2017 at 2:45
  • That didn't help :(
    – Liker
    Commented Apr 15, 2022 at 4:29
2

The answer already posted (and accepted) is probably correct for the issue as it originally stood.

Today I had the same issue, but the accepted answer did not fix it. Upon investigation, it seems the resource has moved (possibly temporarily) and is now sat behind an invalid SSL certificate.

This worked for me:

curl --insecure -LSso ~/.vim/autoload/pathogen.vim https://raw.githubusercontent.com/tpope/vim-pathogen/master/autoload/pathogen.vim
4
  • 1
    Thank you for this - It seemed for a while only Unix people were allowed to use pathogen! Commented Feb 13, 2018 at 21:08
  • For some reason that didn't work for me...
    – Liker
    Commented Aug 16, 2022 at 4:02
  • @Liker777 Did it throw an error or anything?
    – wally
    Commented Aug 23, 2022 at 10:09
  • 1
    @wally for now I just got rid of that because I was tired to resolve plugs of pathogen. I merely install plugins manually for now and it is much easier...
    – Liker
    Commented Aug 24, 2022 at 12:45
0

I have the same problem "Ubuntu 16.04"

And this solution: 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

Not the answer you're looking for? Browse other questions tagged or ask your own question.