use Plugin instead Bundle
- closes many issues )
This commit is contained in:
committed by
Jeremy Pallats/starcraft.man
parent
941158665e
commit
0521de95ea
@@ -4,7 +4,7 @@ func! vundle#installer#new(bang, ...) abort
|
||||
\ map(copy(a:000), 'vundle#config#bundle(v:val, {})')
|
||||
|
||||
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, 1)], names + ['Helptags'])
|
||||
call vundle#scripts#view('Installer',['" Installing plugins to '.expand(g:bundle_dir, 1)], names + ['Helptags'])
|
||||
|
||||
call s:process(a:bang, (a:bang ? 'add!' : 'add'))
|
||||
|
||||
@@ -30,7 +30,7 @@ func! s:process(bang, cmd)
|
||||
endif
|
||||
|
||||
if 'updated' == g:vundle_last_status && empty(msg)
|
||||
let msg = 'Bundles updated; press u to view changelog'
|
||||
let msg = 'Plugins updated; press u to view changelog'
|
||||
endif
|
||||
|
||||
" goto next one
|
||||
@@ -81,7 +81,7 @@ func! vundle#installer#run(func_name, name, ...) abort
|
||||
return status
|
||||
endf
|
||||
|
||||
func! s:sign(status)
|
||||
func! s:sign(status)
|
||||
if (!has('signs'))
|
||||
return
|
||||
endif
|
||||
@@ -100,7 +100,14 @@ endf
|
||||
func! vundle#installer#install(bang, name) abort
|
||||
if !isdirectory(g:bundle_dir) | call mkdir(g:bundle_dir, 'p') | endif
|
||||
|
||||
let b = vundle#config#init_bundle(a:name, {})
|
||||
let n = substitute(a:name,"['".'"]\+','','g')
|
||||
let matched = filter(copy(g:bundles), 'v:val.name_spec == n')
|
||||
|
||||
if len(matched) > 0
|
||||
let b = matched[0]
|
||||
else
|
||||
let b = vundle#config#init_bundle(a:name, {})
|
||||
endif
|
||||
|
||||
return s:sync(a:bang, b)
|
||||
endf
|
||||
@@ -123,21 +130,21 @@ func! vundle#installer#helptags(bundles) abort
|
||||
let statuses = map(copy(help_dirs), 's:helptags(v:val)')
|
||||
let errors = filter(statuses, 'v:val == 0')
|
||||
|
||||
call s:log('Helptags: '.len(help_dirs).' bundles processed')
|
||||
call s:log('Helptags: '.len(help_dirs).' plugins processed')
|
||||
|
||||
return len(errors)
|
||||
endf
|
||||
|
||||
func! vundle#installer#list(bang) abort
|
||||
let bundles = vundle#scripts#bundle_names(map(copy(g:bundles), 'v:val.name_spec'))
|
||||
call vundle#scripts#view('list', ['" My Bundles'], bundles)
|
||||
call vundle#scripts#view('list', ['" My Plugins'], bundles)
|
||||
redraw
|
||||
echo len(g:bundles).' bundles configured'
|
||||
echo len(g:bundles).' plugins configured'
|
||||
endf
|
||||
|
||||
|
||||
func! vundle#installer#clean(bang) abort
|
||||
let bundle_dirs = map(copy(g:bundles), 'v:val.path()')
|
||||
let bundle_dirs = map(copy(g:bundles), 'v:val.path()')
|
||||
let all_dirs = (v:version > 702 || (v:version == 702 && has("patch51")))
|
||||
\ ? split(globpath(g:bundle_dir, '*', 1), "\n")
|
||||
\ : split(globpath(g:bundle_dir, '*'), "\n")
|
||||
@@ -147,7 +154,7 @@ func! vundle#installer#clean(bang) abort
|
||||
let headers = ['" All clean!']
|
||||
let names = []
|
||||
else
|
||||
let headers = ['" Removing bundles:']
|
||||
let headers = ['" Removing Plugins:']
|
||||
let names = vundle#scripts#bundle_names(map(copy(x_dirs), 'fnamemodify(v:val, ":t")'))
|
||||
end
|
||||
|
||||
@@ -179,7 +186,7 @@ func! vundle#installer#delete(bang, dir_name) abort
|
||||
let out = s:system(cmd)
|
||||
|
||||
call s:log('')
|
||||
call s:log('Bundle '.a:dir_name)
|
||||
call s:log('Plugin '.a:dir_name)
|
||||
call s:log('$ '.cmd)
|
||||
call s:log('> '.out)
|
||||
|
||||
@@ -229,7 +236,7 @@ func! s:sync(bang, bundle) abort
|
||||
|
||||
let out = s:system(cmd)
|
||||
call s:log('')
|
||||
call s:log('Bundle '.a:bundle.name_spec)
|
||||
call s:log('Plugin '.a:bundle.name_spec)
|
||||
call s:log('$ '.cmd)
|
||||
call s:log('> '.out)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user