Fixing reloading issue.

- closes https://github.com/gmarik/vundle/issues/#issue/2
- thanks http://github.com/dag for reporting
This commit is contained in:
gmarik 2010-12-11 20:37:28 -06:00
parent ca9c0425a0
commit 5a7ff95560

View File

@ -1,6 +1,5 @@
func! vundle#installer#install(bang) func! vundle#installer#install(bang)
" TODO: obtain Bundles without sourcing .vimrc call s:reload_bundles()
silent source ~/.vimrc
if !isdirectory(g:bundle_dir) | call mkdir(g:bundle_dir, 'p') | endif if !isdirectory(g:bundle_dir) | call mkdir(g:bundle_dir, 'p') | endif
for bundle in g:bundles | call s:install('!' == a:bang, bundle) | endfor for bundle in g:bundles | call s:install('!' == a:bang, bundle) | endfor
endf endf
@ -11,6 +10,12 @@ func! vundle#installer#helptags()
call s:log('Done. '.c.' bundles processed') call s:log('Done. '.c.' bundles processed')
endf endf
func! s:reload_bundles()
" TODO: obtain Bundles without sourcing .vimrc
silent source $MYVIMRC
if !filereadable($MYGVIMRC)| silent source $MYGVIMRC | endif
endf
func! s:helptags(rtp) func! s:helptags(rtp)
if !(isdirectory(a:rtp.'/doc') && (!filereadable(a:rtp.'/doc/tags') || filewritable(a:rtp.'/doc/tags'))) if !(isdirectory(a:rtp.'/doc') && (!filereadable(a:rtp.'/doc/tags') || filewritable(a:rtp.'/doc/tags')))
return 0 return 0