inline loop

- also work in batches
This commit is contained in:
gmarik 2012-01-28 19:54:03 -06:00
parent 1fce719532
commit 5b0bb1375d

View File

@ -65,11 +65,19 @@ func! s:parse_name(arg)
endf endf
func! s:rtp_rm_a() func! s:rtp_rm_a()
call filter(copy(g:bundles), 's:rtp_rm(v:val.rtpath)') 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 endf
func! s:rtp_add_a() func! s:rtp_add_a()
call filter(reverse(copy(g:bundles)), 's:rtp_add(v:val.rtpath)') 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 endf
func! s:rtp_rm(dir) abort func! s:rtp_rm(dir) abort