introduce :Bundles
- unify search and browse unders same interface
This commit is contained in:
parent
3f13edf6aa
commit
b85b45b80f
@ -16,11 +16,12 @@ com! -nargs=? -bang BundleClean
|
|||||||
com! -nargs=0 BundleDocs
|
com! -nargs=0 BundleDocs
|
||||||
\ call vundle#installer#helptags(g:bundles)
|
\ call vundle#installer#helptags(g:bundles)
|
||||||
|
|
||||||
com! -nargs=+ -bang BundleSearch
|
com! -nargs=? -bang Bundles
|
||||||
\ silent call vundle#scripts#search('!' == '<bang>', <q-args>)
|
\ call vundle#scripts#all('!'=='<bang>', <q-args>)
|
||||||
|
|
||||||
com! -nargs=0 Vundle
|
" deprecated in favor of Bundles
|
||||||
\ call vundle#scripts#browse()
|
com! -nargs=? -bang BundleSearch
|
||||||
|
\ call vundle#scripts#all('!' == '<bang>', <q-args>)
|
||||||
|
|
||||||
com! -nargs=0 VundleLog
|
com! -nargs=0 VundleLog
|
||||||
\ silent pedit `=g:vundle_log`
|
\ silent pedit `=g:vundle_log`
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
func! vundle#scripts#search(bang,search_str)
|
func! vundle#scripts#all(bang, ...)
|
||||||
let matches = filter(s:load_scripts(a:bang), 'v:val =~? "'.escape(a:search_str,'"').'"')
|
if a:1== '' " whether refine search string given
|
||||||
call s:display(['" Search results for: '.a:search_str], matches)
|
call s:display(['" Vim scripts: '], s:load_scripts(a:bang))
|
||||||
let @/=a:search_str
|
else
|
||||||
redraw
|
let matches = filter(s:load_scripts(a:bang), 'v:val =~? "'.escape(a:1,'"').'"')
|
||||||
endf
|
call s:display(['" Search results for: '.a:1], matches)
|
||||||
|
let @/=a:1
|
||||||
func! vundle#scripts#browse()
|
redraw
|
||||||
call s:display(['" Vim scripts: '], s:load_scripts(0))
|
endif
|
||||||
endf
|
endf
|
||||||
|
|
||||||
func! vundle#scripts#complete(a,c,d)
|
func! vundle#scripts#complete(a,c,d)
|
||||||
|
Loading…
Reference in New Issue
Block a user