Pathogen bundles not being saved by git

72 views Asked by At

Original question
Pathogen bundles not being loaded.
I'm running Kali Linux and I've set up my .vimrc in the recommended way

set nocompatible

execute pathogen#infect('~/.vim/bundle/{}')

filetype on
filetype plugin on
filetype plugin indent on

syntax enable
colorscheme solarized

but this gives me errors for any of the bundles I have installed (e.g. E492: Not an editor command: NERDTree or E185: Cannot find colorscheme 'solarized')

Running the following commands once vim has launched, shows that the directory is correct.

echo pathogen#glob_directories("~/.vim/bundle/*") ---> all of my bundles are returned

Is there anything else I'm missing?

Update
I have all of my dotfiles in a git repo. But when I run a git add, only the directories of the bundles are added but none of the files themselves. How do I include pathogen bundles in my "dotfiles" repo?

1

There are 1 answers

0
Ben On BEST ANSWER

This ended up being a git issue. Because I have my dotfiles in a git repo, when I installed the bundles I should have used:

git submodule init
git submodule add https://github.com/scrooloose/nerdtree.git ~/.vim/bundle/nerdtree
git submodule add --depth=1 https://github.com/vim-syntastic/syntastic.git ~/.vim/bundle/syntastic
...

As opposed to

git clone https://github.com/scrooloose/nerdtree.git ~/.vim/bundle/nerdtree
...

After running a pull on a different machine. I needed to install these submodules

git submodule init
git submodule update

note

I had to tinker with the file ~/.gitmodules to get my paths set to something that could be used under different usernames and systems