4

I like the idea of keeping all my Vim plugins and my vimrc in Dropbox. I also love pathogen. Looking at the pathogen.vim file, it seems I can provide the pathogen#infect() function with an alternative location for my bundle folder. But this just doesn't work. I've searched high and low for a solution, but nothing I do will allow me to change the 'working directory', as it were, for pathogen to '~/Dropbox/Vim/GlobalRuntimePath/bundle'. I've tried sourcing pathogen.vim directly in my vimrc, to no avail. Pathogen doesn't complain, just my vimrc when it tries to call upon functions from plugins that no longer exists when I remove their local copies.

Am I asking the wrong questions?

Jim Deville
  • 10,632
  • 1
  • 37
  • 47
atimholt
  • 101
  • 7

1 Answers1

5

There is a way for adding custom bundle directories provided in Pathogen. First, one should append paths to the directories containing additional bundles to the runtimepath option:

:set runtimepath+=~/Dropbox/Vim/GlobalRuntimePath

Then, when loading Pathogen in .vimrc file, one should specify the name of all bundle directories (they must have the same one) as the argument to the runtime_append_all_bundles call:

:call pathogen#runtime_append_all_bundles('bundle')

If bundle directories are named by default, bundle, the argument can be omitted.

ib.
  • 27,830
  • 11
  • 80
  • 100
  • Note that the methodology has changed in the latest version of pathogen, as of 2016-06-21T08:48:59. The new version states: `Change pathogen#runtime_append_all_bundles('bundle') to pathogen#infect('bundle/{}')` – dreftymac Jun 21 '16 at 15:49