Preserve rtp
ordered according to Bundle declarations
- fixes https://github.com/gmarik/vundle/issues#issue/3 - TODO: not the most efficient approach
This commit is contained in:
parent
79e2e58107
commit
55a5ef041c
@ -10,8 +10,6 @@ com! -nargs=0 BundleDocs call vundle#installer#helptags()
|
||||
|
||||
com! -nargs=+ -bang BundleSearch silent call vundle#scripts#search("<bang>", <q-args>)
|
||||
|
||||
if !exists('g:bundles') | let g:bundles = [] | endif
|
||||
|
||||
func! vundle#rc()
|
||||
let g:bundle_dir = expand('$HOME/.vim/bundle')
|
||||
call vundle#config#init()
|
||||
|
@ -1,14 +1,16 @@
|
||||
func! vundle#config#bundle(arg, ...)
|
||||
let bundle = extend(s:parse_options(a:000), s:parse_name(a:arg))
|
||||
call extend(bundle, copy(s:bundle))
|
||||
call s:rtp_rm_a()
|
||||
call add(g:bundles, bundle)
|
||||
call s:rtp_add(bundle.rtpath())
|
||||
call s:rtp_add_a()
|
||||
" TODO: fix this: explicit sourcing kills command-T
|
||||
" call vundle#config#require(bundle)
|
||||
endf
|
||||
|
||||
func! vundle#config#init()
|
||||
call filter(g:bundles, 's:rtp_rm(v:val.rtpath())')
|
||||
if !exists('g:bundles') | let g:bundles = [] | endif
|
||||
call s:rtp_rm_a()
|
||||
let g:bundles = []
|
||||
endf
|
||||
|
||||
@ -43,6 +45,14 @@ func! s:parse_name(arg)
|
||||
return {'name': name, 'uri': uri }
|
||||
endf
|
||||
|
||||
func! s:rtp_rm_a()
|
||||
for b in g:bundles | call s:rtp_rm(b.rtpath()) | endfor
|
||||
endf
|
||||
|
||||
func! s:rtp_add_a()
|
||||
for b in reverse(copy(g:bundles)) | call s:rtp_add(b.rtpath()) | endfor
|
||||
endf
|
||||
|
||||
func! s:rtp_rm(dir)
|
||||
exec 'set rtp-='.a:dir
|
||||
exec 'set rtp-='.expand(a:dir.'/after')
|
||||
|
Loading…
Reference in New Issue
Block a user