Revert "change &rtp manipulation"
- causes #203
This reverts commit 1e140c9f6b
.
This commit is contained in:
parent
d713b2737b
commit
3ad4b0334c
@ -1,13 +1,14 @@
|
|||||||
func! vundle#config#bundle(arg, ...)
|
func! vundle#config#bundle(arg, ...)
|
||||||
let bundle = vundle#config#init_bundle(a:arg, a:000)
|
let bundle = vundle#config#init_bundle(a:arg, a:000)
|
||||||
call s:rtp_rm(bundle.rtpath)
|
call s:rtp_rm_a()
|
||||||
call add(g:bundles, bundle)
|
call add(g:bundles, bundle)
|
||||||
call s:rtp_add(bundle.rtpath)
|
call s:rtp_add_a()
|
||||||
return bundle
|
return bundle
|
||||||
endf
|
endf
|
||||||
|
|
||||||
func! vundle#config#init()
|
func! vundle#config#init()
|
||||||
if !exists('g:bundles') | let g:bundles = [] | endif
|
if !exists('g:bundles') | let g:bundles = [] | endif
|
||||||
|
call s:rtp_rm_a()
|
||||||
let g:bundles = []
|
let g:bundles = []
|
||||||
endf
|
endf
|
||||||
|
|
||||||
@ -63,17 +64,30 @@ func! s:parse_name(arg)
|
|||||||
return {'name': name, 'uri': uri, 'name_spec': arg }
|
return {'name': name, 'uri': uri, 'name_spec': arg }
|
||||||
endf
|
endf
|
||||||
|
|
||||||
|
func! s:rtp_rm_a()
|
||||||
|
let paths = map(copy(g:bundles), 'v:val.rtpath')
|
||||||
|
let prepends = join(paths, ',')
|
||||||
|
let appends = join(paths, '/after,').'/after'
|
||||||
|
exec 'set rtp-='.fnameescape(prepends)
|
||||||
|
exec 'set rtp-='.fnameescape(appends)
|
||||||
|
endf
|
||||||
|
|
||||||
|
func! s:rtp_add_a()
|
||||||
|
let paths = map(copy(g:bundles), 'v:val.rtpath')
|
||||||
|
let prepends = join(paths, ',')
|
||||||
|
let appends = join(paths, '/after,').'/after'
|
||||||
|
exec 'set rtp^='.fnameescape(prepends)
|
||||||
|
exec 'set rtp+='.fnameescape(appends)
|
||||||
|
endf
|
||||||
|
|
||||||
func! s:rtp_rm(dir) abort
|
func! s:rtp_rm(dir) abort
|
||||||
exec 'set rtp-='.fnameescape(expand(a:dir, 1))
|
exec 'set rtp-='.fnameescape(expand(a:dir, 1))
|
||||||
exec 'set rtp-='.fnameescape(expand(a:dir.'/after', 1))
|
exec 'set rtp-='.fnameescape(expand(a:dir.'/after', 1))
|
||||||
endf
|
endf
|
||||||
|
|
||||||
func! s:rtp_add(dir) abort
|
func! s:rtp_add(dir) abort
|
||||||
exec 'set rtp+='.fnameescape(expand(a:dir, 1))
|
exec 'set rtp^='.fnameescape(expand(a:dir, 1))
|
||||||
let after_dir = expand(a:dir.'/after', 1)
|
exec 'set rtp+='.fnameescape(expand(a:dir.'/after', 1))
|
||||||
if isdirectory(after_dir)
|
|
||||||
exec 'set rtp+='.fnameescape(after_dir)
|
|
||||||
end
|
|
||||||
endf
|
endf
|
||||||
|
|
||||||
func! s:expand_path(path) abort
|
func! s:expand_path(path) abort
|
||||||
|
Loading…
Reference in New Issue
Block a user