From f99ca2e5ac25739c1f83ce8f9a2c3265b311b946 Mon Sep 17 00:00:00 2001 From: gmarik Date: Thu, 10 Mar 2011 22:27:50 -0600 Subject: [PATCH] replaced loops with functional analogues --- autoload/vundle/config.vim | 4 ++-- autoload/vundle/installer.vim | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/autoload/vundle/config.vim b/autoload/vundle/config.vim index 9a607af..59a9cad 100644 --- a/autoload/vundle/config.vim +++ b/autoload/vundle/config.vim @@ -50,11 +50,11 @@ func! s:parse_name(arg) endf func! s:rtp_rm_a() - for b in g:bundles | call s:rtp_rm(b.rtpath()) | endfor + call filter(copy(g:bundles), 's:rtp_rm(v:val.rtpath())') endf func! s:rtp_add_a() - for b in reverse(copy(g:bundles)) | call s:rtp_add(b.rtpath()) | endfor + call filter(reverse(copy(g:bundles)), 's:rtp_add(v:val.rtpath())') endf func! s:rtp_rm(dir) diff --git a/autoload/vundle/installer.vim b/autoload/vundle/installer.vim index cca0ba7..fda2985 100644 --- a/autoload/vundle/installer.vim +++ b/autoload/vundle/installer.vim @@ -3,7 +3,7 @@ func! vundle#installer#install(bang, ...) let bundles = (a:1 == '') ? \ s:reload_bundles() : \ map(copy(a:000), 'vundle#config#init_bundle(v:val, {})') - for bundle in bundles | call s:install(a:bang, bundle) | endfor + call map(copy(bundles), 's:install(a:bang, v:val)') call vundle#installer#helptags(bundles) endf