adding to runtimepath isn't bundle's responsibility
This commit is contained in:
parent
9e411368e0
commit
d3f056026a
@ -19,7 +19,7 @@ func! vundle#add_bundle(arg, ...)
|
|||||||
call add(g:bundles, bundle)
|
call add(g:bundles, bundle)
|
||||||
call extend(bundle, s:parse_name(a:arg))
|
call extend(bundle, s:parse_name(a:arg))
|
||||||
call extend(bundle, copy(s:bundle))
|
call extend(bundle, copy(s:bundle))
|
||||||
call bundle.require()
|
call s:rtp_add(bundle.rtpath())
|
||||||
endf
|
endf
|
||||||
|
|
||||||
func! vundle#install_bundles()
|
func! vundle#install_bundles()
|
||||||
@ -32,6 +32,13 @@ func! vundle#helptags()
|
|||||||
for bundle in g:bundles | call bundle.helptags() | endfor
|
for bundle in g:bundles | call bundle.helptags() | endfor
|
||||||
endf
|
endf
|
||||||
|
|
||||||
|
func! s:rtp_add(dir)
|
||||||
|
exec 'set rtp^='.a:dir
|
||||||
|
let after = expand(a:dir.'/after') | if isdirectory(after)
|
||||||
|
exec 'set rtp+='.after
|
||||||
|
endif
|
||||||
|
endf
|
||||||
|
|
||||||
func! s:parse_options(opts)
|
func! s:parse_options(opts)
|
||||||
" TODO: improve this
|
" TODO: improve this
|
||||||
if len(a:opts) != 1 | return {} | endif
|
if len(a:opts) != 1 | return {} | endif
|
||||||
@ -65,13 +72,6 @@ func! s:bundle.rtpath()
|
|||||||
return has_key(self, 'rtp') ? join([self.path(), self.rtp], '/') : self.path()
|
return has_key(self, 'rtp') ? join([self.path(), self.rtp], '/') : self.path()
|
||||||
endf
|
endf
|
||||||
|
|
||||||
func! s:bundle.require()
|
|
||||||
let dir = self.rtpath()
|
|
||||||
exec 'set rtp^='.dir
|
|
||||||
let after = expand(dir.'/after') | if isdirectory(after)
|
|
||||||
exec 'set rtp+='.after
|
|
||||||
endif
|
|
||||||
endf
|
|
||||||
|
|
||||||
func! s:bundle.helptags()
|
func! s:bundle.helptags()
|
||||||
let dir = self.rtpath()
|
let dir = self.rtpath()
|
||||||
|
Loading…
Reference in New Issue
Block a user