Browse Source

Complete installed plugins also for VundleUpdate

pull/808/head
Jacobo de Vera 11 years ago
committed by Simon Podhajsky
parent
commit
3cf90c528d
2 changed files with 6 additions and 3 deletions
  1. +1
    -0
      autoload/vundle.vim
  2. +5
    -3
      autoload/vundle/scripts.vim

+ 1
- 0
autoload/vundle.vim View File

@ -32,6 +32,7 @@ com! -nargs=? -bang -complete=custom,vundle#scripts#complete VundleSearch Plugi
com! -nargs=? -bang VundleClean PluginClean<bang> com! -nargs=? -bang VundleClean PluginClean<bang>
com! -nargs=0 VundleDocs PluginDocs com! -nargs=0 VundleDocs PluginDocs
com! VundleUpdate PluginInstall! com! VundleUpdate PluginInstall!
com! -nargs=* -complete=custom,vundle#scripts#complete VundleUpdate PluginInstall! <args>
" Deprecated Commands " Deprecated Commands
com! -nargs=+ Bundle call vundle#config#bundle(<args>) com! -nargs=+ Bundle call vundle#config#bundle(<args>)


+ 5
- 3
autoload/vundle/scripts.vim View File

@ -36,13 +36,15 @@ endf
" "
" a, c, d -- see :h command-completion-custom " a, c, d -- see :h command-completion-custom
" return -- all valid plugin names from vim-scripts.org as completion " 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) 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") return join(map(copy(g:bundles), 'v:val.name'), "\n")
else else
" Or all known plugins otherwise
return join(s:load_scripts(0),"\n") return join(s:load_scripts(0),"\n")
endif endif
endf endf


Loading…
Cancel
Save