From 5b0bb1375d324864715e3f6e5d4454b43abe0ebb Mon Sep 17 00:00:00 2001 From: gmarik Date: Sat, 28 Jan 2012 19:54:03 -0600 Subject: [PATCH] inline loop - also work in batches --- autoload/vundle/config.vim | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/autoload/vundle/config.vim b/autoload/vundle/config.vim index fd80cff..55c7d7d 100644 --- a/autoload/vundle/config.vim +++ b/autoload/vundle/config.vim @@ -65,11 +65,19 @@ func! s:parse_name(arg) endf 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 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 func! s:rtp_rm(dir) abort