My vim plugins are not loading

vim

I am on a Mac. I want to install vim plugins. The problem like always is that after following exactly the instructions on https://github.com/tpope/vim-pathogen the plugin fugitive will not load. I followed this also https://github.com/scrooloose/nerdtree again nothing. Could somebody explain me why is this happening and a way to fix it please?

This is my structure:

$ls .vim/*
.vim/autoload:
fuf          fuf.vim      l9           l9.vim       pathogen.vim rails.vim

.vim/bundle:
vim-fugitive

.vim/doc:
fuf.jax   fuf.txt   l9.jax    l9.txt    rails.txt tags      tags-ja

.vim/plugin:
fuf.vim   l9.vim    rails.vim

invoking pathogen

  call pathogen#infect()
  filetype off
  syntax on
  filetype plugin indent on

added from https://stackoverflow.com/questions/3383502/pathogen-does-not-load-plugins

:scriptnames output

  1: /usr/share/vim/vimrc
  2: /Users/test/.vimrc
  3: /usr/share/vim/vim73/syntax/syntax.vim
  4: /usr/share/vim/vim73/syntax/synload.vim
  5: /usr/share/vim/vim73/syntax/syncolor.vim
  6: /usr/share/vim/vim73/filetype.vim
  7: /usr/share/vim/vim73/ftplugin.vim
  8: /usr/share/vim/vim73/indent.vim
  9: /usr/share/vim/vim73/macros/matchit.vim
 10: /Users/test/.vim/autoload/pathogen.vim
 11: /usr/share/vim/vim73/ftoff.vim
 12: /usr/share/vim/vim73/syntax/nosyntax.vim
 13: /Users/test/.vim/plugin/fuf.vim
 14: /Users/test/.vim/autoload/l9.vim
 15: /Users/test/.vim/autoload/fuf.vim
 16: /Users/test/.vim/autoload/fuf/buffer.vim
 17: /Users/test/.vim/autoload/fuf/file.vim
 18: /Users/test/.vim/autoload/fuf/coveragefile.vim

Best Answer

Without looking at your complete .vimrc I would adventure to say that you should set the flag for non-vi compatibility: set nocompatible

That should be the first thing (or one of the first things) in your .vimrc

The Vim version that comes with OSX is not only a bit behind but it is also not compiled with a bunch of features plugins require. Some plugins don't even load at all if the version is not compatible with the ones they support.

Finally, I would start Vim with the verbose flag on (vim -V) where you can see all the output of what exactly Vim is loading and looking for.

This answer is somewhat vague, but there are just too many things that can happen to get that behavior. I just mentioned the top 3 on my list: latest Vim version compiled with huge flag, set nocompatible in your .vimrc and load Vim with the verbose flag.

Related Question