I am new to VIM. I tried to install pathogen.vim plugin. I will describe the folder structure.
--- /etc/vim
-vimrc
-vimrc.tiny
-autoload
-pathogen.vim
-bundle
I have not added anything in the bundle yet.
In the vimrc file I have added few lines
call pathogen#infect()
syntax on
filetype plugin indent on
But it was throwing the error whenever I was starting vim from my terminal.
ERROR -
Error detected while processing /usr/share/vim/vimrc:
line 57:
E117: Unknown function: pathogen#infect
Press ENTER or type command to continue
I then tried adding
runtime /etc/vim/autoload/pathogen.vim
on top of the calling the pathogen infect function, but nothing is happening. And in the error the path shown is /usr/share/vim/vimrc
, may be because etc/vim/vimrc is the symlink
. I am not sure, I am new to it.
No. Don't touch system files, ever.
Whatever you have done in /etc
must be done in /home/username
:
/home/username/.vim <-- the directory where you put your plugins
and colorschemes and stuff
/home/username/.vimrc <-- the file where you put your settings
The pathogen plugin should be there:
/home/username/.vim/autoload/pathogen.vim
The bundle directory should be there:
/home/username/.vim/bundle
The three lines should be in this file:
/home/username/.vimrc