parent
baa3e989e0
commit
43080a1e5c
@ -36,7 +36,7 @@ endif
|
|||||||
|
|
||||||
|
|
||||||
func! vundle#rc(...) abort
|
func! vundle#rc(...) abort
|
||||||
let g:bundle_dir = len(a:000) > 0 ? expand(a:1) : expand('$HOME/.vim/bundle')
|
let g:bundle_dir = len(a:000) > 0 ? expand(a:1, 1) : expand('$HOME/.vim/bundle', 1)
|
||||||
let g:vundle_log = []
|
let g:vundle_log = []
|
||||||
call vundle#config#init()
|
call vundle#config#init()
|
||||||
endf
|
endf
|
||||||
|
@ -69,17 +69,17 @@ func! s:rtp_add_a()
|
|||||||
endf
|
endf
|
||||||
|
|
||||||
func! s:rtp_rm(dir) abort
|
func! s:rtp_rm(dir) abort
|
||||||
exec 'set rtp-='.fnameescape(expand(a:dir))
|
exec 'set rtp-='.fnameescape(expand(a:dir, 1))
|
||||||
exec 'set rtp-='.fnameescape(expand(a:dir.'/after'))
|
exec 'set rtp-='.fnameescape(expand(a:dir.'/after', 1))
|
||||||
endf
|
endf
|
||||||
|
|
||||||
func! s:rtp_add(dir) abort
|
func! s:rtp_add(dir) abort
|
||||||
exec 'set rtp^='.fnameescape(expand(a:dir))
|
exec 'set rtp^='.fnameescape(expand(a:dir, 1))
|
||||||
exec 'set rtp+='.fnameescape(expand(a:dir.'/after'))
|
exec 'set rtp+='.fnameescape(expand(a:dir.'/after', 1))
|
||||||
endf
|
endf
|
||||||
|
|
||||||
func! s:expand_path(path) abort
|
func! s:expand_path(path) abort
|
||||||
return simplify(expand(a:path))
|
return simplify(expand(a:path, 1))
|
||||||
endf
|
endf
|
||||||
|
|
||||||
let s:bundle = {}
|
let s:bundle = {}
|
||||||
|
@ -4,7 +4,7 @@ func! vundle#installer#new(bang, ...) abort
|
|||||||
\ map(copy(a:000), 'vundle#config#init_bundle(v:val, {})')
|
\ map(copy(a:000), 'vundle#config#init_bundle(v:val, {})')
|
||||||
|
|
||||||
let names = vundle#scripts#bundle_names(map(copy(bundles), 'v:val.name_spec'))
|
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 vundle#scripts#view('Installer',['" Installing bundles to '.expand(g:bundle_dir, 1)], names + ['Helptags'])
|
||||||
|
|
||||||
call s:process(a:bang, (a:bang ? 'add!' : 'add'))
|
call s:process(a:bang, (a:bang ? 'add!' : 'add'))
|
||||||
|
|
||||||
@ -125,7 +125,7 @@ endf
|
|||||||
|
|
||||||
func! vundle#installer#clean(bang) abort
|
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 = split(globpath(g:bundle_dir, '*'), "\n")
|
let all_dirs = split(globpath(g:bundle_dir, '*', 1), "\n")
|
||||||
let x_dirs = filter(all_dirs, '0 > index(bundle_dirs, v:val)')
|
let x_dirs = filter(all_dirs, '0 > index(bundle_dirs, v:val)')
|
||||||
|
|
||||||
if empty(x_dirs)
|
if empty(x_dirs)
|
||||||
@ -178,7 +178,7 @@ endf
|
|||||||
func! s:has_doc(rtp) abort
|
func! s:has_doc(rtp) abort
|
||||||
return isdirectory(a:rtp.'/doc')
|
return isdirectory(a:rtp.'/doc')
|
||||||
\ && (!filereadable(a:rtp.'/doc/tags') || filewritable(a:rtp.'/doc/tags'))
|
\ && (!filereadable(a:rtp.'/doc/tags') || filewritable(a:rtp.'/doc/tags'))
|
||||||
\ && !(empty(glob(a:rtp.'/doc/*.txt')) && empty(glob(a:rtp.'/doc/*.??x')))
|
\ && !(empty(glob(a:rtp.'/doc/*.txt', 1)) && empty(glob(a:rtp.'/doc/*.??x', 1)))
|
||||||
endf
|
endf
|
||||||
|
|
||||||
func! s:helptags(rtp) abort
|
func! s:helptags(rtp) abort
|
||||||
@ -192,7 +192,7 @@ func! s:helptags(rtp) abort
|
|||||||
endf
|
endf
|
||||||
|
|
||||||
func! s:sync(bang, bundle) abort
|
func! s:sync(bang, bundle) abort
|
||||||
let git_dir = expand(a:bundle.path().'/.git/')
|
let git_dir = expand(a:bundle.path().'/.git/', 1)
|
||||||
if isdirectory(git_dir)
|
if isdirectory(git_dir)
|
||||||
if !(a:bang) | return 'todate' | endif
|
if !(a:bang) | return 'todate' | endif
|
||||||
let cmd = 'cd '.shellescape(a:bundle.path()).' && git pull'
|
let cmd = 'cd '.shellescape(a:bundle.path()).' && git pull'
|
||||||
|
@ -105,7 +105,7 @@ func! vundle#scripts#view(title, headers, results)
|
|||||||
endf
|
endf
|
||||||
|
|
||||||
func! s:fetch_scripts(to)
|
func! s:fetch_scripts(to)
|
||||||
let scripts_dir = fnamemodify(expand(a:to), ":h")
|
let scripts_dir = fnamemodify(expand(a:to, 1), ":h")
|
||||||
if !isdirectory(scripts_dir)
|
if !isdirectory(scripts_dir)
|
||||||
call mkdir(scripts_dir, "p")
|
call mkdir(scripts_dir, "p")
|
||||||
endif
|
endif
|
||||||
@ -134,7 +134,7 @@ func! s:fetch_scripts(to)
|
|||||||
endf
|
endf
|
||||||
|
|
||||||
func! s:load_scripts(bang)
|
func! s:load_scripts(bang)
|
||||||
let f = expand(g:bundle_dir.'/.vundle/script-names.vim-scripts.org.json')
|
let f = expand(g:bundle_dir.'/.vundle/script-names.vim-scripts.org.json', 1)
|
||||||
if a:bang || !filereadable(f)
|
if a:bang || !filereadable(f)
|
||||||
if 0 != s:fetch_scripts(f)
|
if 0 != s:fetch_scripts(f)
|
||||||
return []
|
return []
|
||||||
|
@ -5,7 +5,7 @@ let root = '/tmp/vundle_bundles/'
|
|||||||
let src = 'http://github.com/gmarik/vundle.git'
|
let src = 'http://github.com/gmarik/vundle.git'
|
||||||
" let src = '~/.vim/bundle/vundle/.git'
|
" let src = '~/.vim/bundle/vundle/.git'
|
||||||
|
|
||||||
if !isdirectory(expand(root).'/vundle')
|
if !isdirectory(expand(root, 1).'/vundle')
|
||||||
exec '!git clone '.src.' '.root.'/vundle'
|
exec '!git clone '.src.' '.root.'/vundle'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -56,6 +56,11 @@ filetype plugin indent on " Automatically detect file types.
|
|||||||
|
|
||||||
set wildignore+=doc " should not break helptags
|
set wildignore+=doc " should not break helptags
|
||||||
set wildignore+=.git " should not break clone
|
set wildignore+=.git " should not break clone
|
||||||
|
set wildignore+=.git/* " should not break clone
|
||||||
|
set wildignore+=*/.git/*
|
||||||
|
" TODO: helptags fails with this
|
||||||
|
" set wildignore+=doc/* " should not break clone
|
||||||
|
" set wildignore+=*/doc/*
|
||||||
|
|
||||||
" BundleInstall
|
" BundleInstall
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user