1

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.

Paolo
  • 20,112
  • 21
  • 72
  • 113
Abhishek Prakash
  • 201
  • 1
  • 3
  • 11

1 Answers1

8

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
romainl
  • 186,200
  • 21
  • 280
  • 313
  • I am sorry but there is no .vim folder in my home directory (home/username/), that is why i changed the system files – Abhishek Prakash May 11 '13 at 09:35
  • Do I have to create the .vim and .vimrc folder and file in the home dir explicitly? – Abhishek Prakash May 11 '13 at 09:38
  • I have created .vim dir and .vimrc file in home/username dir, and guess what - it worked like charm. Thanks for the guidance. :) Can we conclude that whatever system files are tere we can manipulate them by adding a .file to the home dir and making changes to them? – Abhishek Prakash May 11 '13 at 09:49
  • 2
    No. You should completely forget abbout those system files. Whatever you do to configure Vim must *always* be done in `$HOME`, whatever you have in `/etc` is irrelevant to your configuration effort. – romainl May 11 '13 at 10:05