source manually installed bundles as well

This commit is contained in:
gmarik 2011-08-25 20:11:58 -05:00
parent 80e6e3c91a
commit 8f13a839dd
2 changed files with 29 additions and 7 deletions

View File

@ -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

View File

@ -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(<q-args>,',')[0], ['!' == '<bang>', <args>])
com! -buffer -bang -nargs=? InstallBundle call vundle#installer#run('vundle#installer#install', split(<q-args>,',')[0], ['!' == '<bang>', <q-args>])
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(<q-args>,',')[0], ['!' == '<bang>', <args>])
com! -buffer -bang -nargs=? InstallAndRequireBundle
\ call vundle#installer#run('vundle#installer#install_and_require', split(<q-args>,',')[0], ['!' == '<bang>', <q-args>])
com! -buffer -bang -nargs=? InstallBundle
\ call vundle#installer#run('vundle#installer#install', split(<q-args>,',')[0], ['!' == '<bang>', <q-args>])
com! -buffer -bang -nargs=0 InstallHelptags
\ call vundle#installer#run('vundle#installer#docs', 'helptags', [])
com! -buffer -nargs=0 VundleLog call s:view_log()
nnoremap <buffer> q :silent bd!<CR>
nnoremap <buffer> D :exec 'Delete'.getline('.')<CR>
nnoremap <buffer> i :exec 'Install'.getline('.')<CR>
nnoremap <buffer> I :exec 'Install'.substitute(getline('.'), '^Bundle ', 'Bundle! ', '')<CR>
nnoremap <buffer> add :exec 'Install'.getline('.')<CR>
nnoremap <buffer> add! :exec 'Install'.substitute(getline('.'), '^Bundle ', 'Bundle! ', '')<CR>
nnoremap <buffer> i :exec 'InstallAndRequire'.getline('.')<CR>
nnoremap <buffer> I :exec 'InstallAndRequire'.substitute(getline('.'), '^Bundle ', 'Bundle! ', '')<CR>
nnoremap <buffer> l :VundleLog<CR>
nnoremap <buffer> h :h vundle<CR>
nnoremap <buffer> ? :norm h<CR>
nnoremap <buffer> c :BundleClean<CR>
nnoremap <buffer> C :BundleClean!<CR>
nnoremap <buffer> r :BundleSearch
nnoremap <buffer> s :BundleSearch
nnoremap <buffer> R :call vundle#scripts#reload()<CR>
" goto first line after headers