diff --git a/autoload/vundle/scripts.vim b/autoload/vundle/scripts.vim index ce3967a..652153e 100644 --- a/autoload/vundle/scripts.vim +++ b/autoload/vundle/scripts.vim @@ -1,5 +1,6 @@ func! vundle#scripts#all(bang, ...) - let info = ['"Keymap: i - Install bundle; c - Cleanup; r - Refine list'] + let b:match = '' + let info = ['"Keymap: i - Install bundle; c - Cleanup; r - Refine list; R - Reload list'] if a:1== '' " whether refine search string given let matches = s:load_scripts(a:bang) call s:display(info, matches) @@ -9,10 +10,16 @@ func! vundle#scripts#all(bang, ...) let @/=a:1 " TODO: highlight doesn't work setl hls + let b:match = a:1 endif echo len(matches).' bundles found' endf +func! vundle#scripts#reload() abort + silent exec ':Bundles! '.(exists('b:match') ? b:match : '') + redraw! +endf + func! vundle#scripts#complete(a,c,d) return join(s:load_scripts(0),"\n") endf diff --git a/ftplugin/vundle.vim b/ftplugin/vundle.vim index d94498d..f21d629 100644 --- a/ftplugin/vundle.vim +++ b/ftplugin/vundle.vim @@ -8,3 +8,4 @@ nnoremap i :call vundle#scripts#install() nnoremap r :Bundles nnoremap c :BundleClean nnoremap C :BundleClean! +nnoremap R :call vundle#scripts#reload()