From a2f7e9b93fcefd869acbfe62da01b590c735cc2e Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sun, 13 Jan 2013 19:41:52 -0500 Subject: [PATCH] Change incubate to be consistent with surround --- autoload/pathogen.vim | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/autoload/pathogen.vim b/autoload/pathogen.vim index 606a4af..632fbee 100644 --- a/autoload/pathogen.vim +++ b/autoload/pathogen.vim @@ -24,8 +24,8 @@ function! s:warn(msg) endif endfunction -" Point of entry for basic default usage. Give a directory name to invoke -" pathogen#incubate() (defaults to "bundle"), or a full path to invoke +" Point of entry for basic default usage. Give a relative path to invoke +" pathogen#incubate() (defaults to "bundle/{}"), or an absolute path to invoke " pathogen#surround(). For backwards compatibility purposes, a full path that " does not end in {} or * is given to pathogen#runtime_prepend_subdirectories() " instead. @@ -170,13 +170,15 @@ function! pathogen#runtime_prepend_subdirectories(path) " {{{1 return pathogen#surround(a:path . pathogen#separator() . '{}') endfunction " }}}1 -" For each directory in rtp, check for the provided subdirectory. If it -" exists, add all subdirectories of that subdirectory to the rtp, immediately -" after the original directory. If no argument is given, 'bundle' is used. -" Repeated calls with the same arguments are ignored. +" For each directory in the runtime path, add a second entry with the given +" argument appended. If the argument ends in '/{}', add a separate entry for +" each subdirectory. The default argument is 'bundle/{}', which means that +" .vim/bundle/*, $VIM/vimfiles/bundle/*, $VIMRUNTIME/bundle/*, +" $VIM/vim/files/bundle/*/after, and .vim/bundle/*/after will be added (on +" UNIX). function! pathogen#incubate(...) abort " {{{1 let sep = pathogen#separator() - let name = a:0 ? substitute(a:1, '[\\/]{}$', '', '') : 'bundle' + let name = a:0 ? a:1 : 'bundle/{}' if "\n".s:done_bundles =~# "\\M\n".name."\n" return "" endif @@ -184,16 +186,16 @@ function! pathogen#incubate(...) abort " {{{1 let list = [] for dir in pathogen#split(&rtp) if dir =~# '\