8 Commits

Author SHA1 Message Date
Tim Pope f195ac5e40 pathogen.vim 2.2
* Accept multiple arguments to pathogen#infect().
* Fix errors in deprecated methods.
2013-01-14 17:54:17 -05:00
Maksim Ryzhikov 1050a784cc Fix error in pathogen#runtime_append_all_bundles 2013-01-14 16:22:57 -05:00
Tim Pope 6cfc5e7759 Fix errors on attempt to warn
Closes #81.
2013-01-14 13:30:43 -05:00
Tim Pope 1b7f130f57 Revert "Point README at stable release"
This reverts commit 95c285e426.
2013-01-13 23:27:54 -05:00
Tim Pope 98659f0af7 Fix multiple arguments to pathogen#infect 2013-01-13 23:17:14 -05:00
Tim Pope a860d000e1 Reveal multiple arguments form of pathogen#infect 2013-01-13 23:09:15 -05:00
Tim Pope 92ca2e574b Accept multiple arguments to pathogen#infect() 2013-01-13 22:55:33 -05:00
Tim Pope 95c285e426 Point README at stable release 2013-01-13 21:06:33 -05:00
2 changed files with 22 additions and 17 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ trailing `{}` is supported.
You can also pass an absolute path instead. I keep the plugins I maintain under `~/src`, and this is how I add them: You can also pass an absolute path instead. I keep the plugins I maintain under `~/src`, and this is how I add them:
execute pathogen#infect('~/src/vim/bundle/{}') execute pathogen#infect('bundle/{}, '~/src/vim/bundle/{}')
Normally to generate documentation, Vim expects you to run `:helptags` Normally to generate documentation, Vim expects you to run `:helptags`
on each directory with documentation (e.g., `:helptags ~/.vim/doc`). on each directory with documentation (e.g., `:helptags ~/.vim/doc`).
+21 -16
View File
@@ -1,6 +1,6 @@
" pathogen.vim - path option manipulation " pathogen.vim - path option manipulation
" Maintainer: Tim Pope <http://tpo.pe/> " Maintainer: Tim Pope <http://tpo.pe/>
" Version: 2.1 " Version: 2.2
" Install in ~/.vim/autoload (or ~\vimfiles\autoload). " Install in ~/.vim/autoload (or ~\vimfiles\autoload).
" "
@@ -30,18 +30,19 @@ endfunction
" does not end in {} or * is given to pathogen#runtime_prepend_subdirectories() " does not end in {} or * is given to pathogen#runtime_prepend_subdirectories()
" instead. " instead.
function! pathogen#infect(...) abort " {{{1 function! pathogen#infect(...) abort " {{{1
let path = a:0 ? a:1 : 'bundle/{}' for path in a:0 ? reverse(copy(a:000)) : ['bundle/{}']
if path =~# '^[^\\/]\+$' if path =~# '^[^\\/]\+$'
call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')') call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')')
call pathogen#incubate(path . '/{}') call pathogen#incubate(path . '/{}')
elseif path =~# '^[^\\/]\+[\\/]\%({}\|\*\)$' elseif path =~# '^[^\\/]\+[\\/]\%({}\|\*\)$'
call pathogen#incubate(path) call pathogen#incubate(path)
elseif path =~# '[\\/]\%({}\|\*\)$' elseif path =~# '[\\/]\%({}\|\*\)$'
call pathogen#surround(path) call pathogen#surround(path)
else else
call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')') call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')')
call pathogen#surround(path . '/{}') call pathogen#surround(path . '/{}')
endif endif
endfor
call pathogen#cycle_filetype() call pathogen#cycle_filetype()
return '' return ''
endfunction " }}}1 endfunction " }}}1
@@ -166,7 +167,7 @@ endfunction " }}}1
" Prepend all subdirectories of path to the rtp, and append all 'after' " Prepend all subdirectories of path to the rtp, and append all 'after'
" directories in those subdirectories. Deprecated. " directories in those subdirectories. Deprecated.
function! pathogen#runtime_prepend_subdirectories(path) " {{{1 function! pathogen#runtime_prepend_subdirectories(path) " {{{1
call s:warn('Change pathogen#runtime_prepend_subdirectories('.string(source_path).') to pathogen#surround('.string(source_path.'/{}').')') call s:warn('Change pathogen#runtime_prepend_subdirectories('.string(a:path).') to pathogen#surround('.string(a:path.'/{}').')')
return pathogen#surround(a:path . pathogen#separator() . '{}') return pathogen#surround(a:path . pathogen#separator() . '{}')
endfunction " }}}1 endfunction " }}}1
@@ -205,8 +206,12 @@ endfunction " }}}1
" Deprecated alias for pathogen#incubate(). " Deprecated alias for pathogen#incubate().
function! pathogen#runtime_append_all_bundles(...) abort " {{{1 function! pathogen#runtime_append_all_bundles(...) abort " {{{1
call s:warn('Change pathogen#runtime_append_all_bundles('.string(source_path).') to pathogen#incubate('.string(source_path.'/{}').')') if a:0
return call('pathogen#incubate', map(copy(a:000, 'v:val . "/{}"')) call s:warn('Change pathogen#runtime_append_all_bundles('.string(a:1).') to pathogen#incubate('.string(a:1.'/{}').')')
else
call s:warn('Change pathogen#runtime_append_all_bundles() to pathogen#incubate()')
endif
return call('pathogen#incubate', map(copy(a:000),'v:val . "/{}"'))
endfunction endfunction
let s:done_bundles = '' let s:done_bundles = ''