From 92a66df592c3562fb39714a3531d8494279b1f6a Mon Sep 17 00:00:00 2001 From: Jacobo de Vera Date: Mon, 2 Mar 2015 22:02:44 +0100 Subject: [PATCH] Complete installed plugins also for VundleUpdate --- autoload/vundle.vim | 1 + autoload/vundle/scripts.vim | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/autoload/vundle.vim b/autoload/vundle.vim index 887ecdd..dded571 100644 --- a/autoload/vundle.vim +++ b/autoload/vundle.vim @@ -32,6 +32,7 @@ com! -nargs=? -bang -complete=custom,vundle#scripts#complete VundleSearch Plugi com! -nargs=? -bang VundleClean PluginClean com! -nargs=0 VundleDocs PluginDocs com! VundleUpdate PluginInstall! +com! -nargs=* -complete=custom,vundle#scripts#complete VundleUpdate PluginInstall! " Deprecated Commands com! -nargs=+ Bundle call vundle#config#bundle() diff --git a/autoload/vundle/scripts.vim b/autoload/vundle/scripts.vim index f160e01..4a066fb 100644 --- a/autoload/vundle/scripts.vim +++ b/autoload/vundle/scripts.vim @@ -36,13 +36,15 @@ endf " " a, c, d -- see :h command-completion-custom " return -- all valid plugin names from vim-scripts.org as completion -" candidates, see also :h command-completion-custom +" candidates, or all installed plugin names when running an 'Update +" variant'. see also :h command-completion-custom " --------------------------------------------------------------------------- func! vundle#scripts#complete(a,c,d) - " Return only installed plugins if updating - if match(a:c, '\v^Plugin%(Install!|Update)') == 0 + if match(a:c, '\v^%(Plugin|Vundle)%(Install!|Update)') == 0 + " Only installed plugins if updating return join(map(copy(g:bundles), 'v:val.name'), "\n") else + " Or all known plugins otherwise return join(s:load_scripts(0),"\n") endif endf