Unknown function: pathogen #infect

I just installed MacVim (and did a Vim override). And I'm 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 is as follows

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

And my directory is as follows

 ~/ .vimrc .vim autoload pathogen.vim bundle nerdtree .viminfo 
+6
source share
2 answers

It looks like you copied pathogen.vim directly from a browser that has all the HTML tags.

Try the following command and try again -

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

Learn more about installing pathogens .

+22
source

The answer already published (and accepted) is probably correct for the problem, since it originally stood.

Today I had the same problem, but the accepted answer did not fix. During the investigation, it seems that the resource has moved (perhaps temporarily) and is now sitting 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 
+1
source

Source: https://habr.com/ru/post/988731/


All Articles