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开发者_Go百科 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?
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.
精彩评论