From 8f13a839dd5f7efaef21a7a20088fcdadc5cda18 Mon Sep 17 00:00:00 2001 From: gmarik Date: Thu, 25 Aug 2011 20:11:58 -0500 Subject: [PATCH] source manually installed bundles as well --- autoload/vundle/installer.vim | 9 ++++++++- autoload/vundle/scripts.vim | 27 +++++++++++++++++++++------ 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/autoload/vundle/installer.vim b/autoload/vundle/installer.vim index 3c30a6c..eaf7ffe 100644 --- a/autoload/vundle/installer.vim +++ b/autoload/vundle/installer.vim @@ -6,7 +6,7 @@ func! vundle#installer#new(bang, ...) abort let names = vundle#scripts#bundle_names(map(copy(bundles), 'v:val.name_spec')) call vundle#scripts#view('Installer',['" Installing bundles to '.expand(g:bundle_dir)], names + ['Helptags']) - call s:process(a:bang, (a:bang ? 'I':'i')) + call s:process(a:bang, (a:bang ? 'add!' : 'add')) call vundle#config#require(bundles) endf @@ -81,6 +81,13 @@ func! s:sign(status) exe ":sign place ".line('.')." line=".line('.')." name=Vu_". a:status ." buffer=" . bufnr("%") endf +func! vundle#installer#install_and_require(bang, name) abort + let result = vundle#installer#install(a:bang, a:name) + let b = vundle#config#init_bundle(a:name, {}) + call vundle#config#require([b]) + return result +endf + func! vundle#installer#install(bang, name) abort if !isdirectory(g:bundle_dir) | call mkdir(g:bundle_dir, 'p') | endif diff --git a/autoload/vundle/scripts.vim b/autoload/vundle/scripts.vim index e856299..368bfed 100644 --- a/autoload/vundle/scripts.vim +++ b/autoload/vundle/scripts.vim @@ -62,23 +62,38 @@ func! vundle#scripts#view(title, headers, results) syn keyword vimCommand Bundle syn keyword vimCommand Helptags - com! -buffer -bang -nargs=1 DeleteBundle call vundle#installer#run('vundle#installer#delete', split(,',')[0], ['!' == '', ]) - com! -buffer -bang -nargs=? InstallBundle call vundle#installer#run('vundle#installer#install', split(,',')[0], ['!' == '', ]) - com! -buffer -bang -nargs=? InstallHelptags call vundle#installer#run('vundle#installer#docs', 'helptags', []) + com! -buffer -bang -nargs=1 DeleteBundle + \ call vundle#installer#run('vundle#installer#delete', split(,',')[0], ['!' == '', ]) + + com! -buffer -bang -nargs=? InstallAndRequireBundle + \ call vundle#installer#run('vundle#installer#install_and_require', split(,',')[0], ['!' == '', ]) + + com! -buffer -bang -nargs=? InstallBundle + \ call vundle#installer#run('vundle#installer#install', split(,',')[0], ['!' == '', ]) + + com! -buffer -bang -nargs=0 InstallHelptags + \ call vundle#installer#run('vundle#installer#docs', 'helptags', []) com! -buffer -nargs=0 VundleLog call s:view_log() + nnoremap q :silent bd! nnoremap D :exec 'Delete'.getline('.') - nnoremap i :exec 'Install'.getline('.') - nnoremap I :exec 'Install'.substitute(getline('.'), '^Bundle ', 'Bundle! ', '') + nnoremap add :exec 'Install'.getline('.') + nnoremap add! :exec 'Install'.substitute(getline('.'), '^Bundle ', 'Bundle! ', '') + + nnoremap i :exec 'InstallAndRequire'.getline('.') + nnoremap I :exec 'InstallAndRequire'.substitute(getline('.'), '^Bundle ', 'Bundle! ', '') nnoremap l :VundleLog + nnoremap h :h vundle + nnoremap ? :norm h nnoremap c :BundleClean nnoremap C :BundleClean! - nnoremap r :BundleSearch + + nnoremap s :BundleSearch nnoremap R :call vundle#scripts#reload() " goto first line after headers