Browse Source

g:vundle_

pull/179/head
Rykka 14 years ago
parent
commit
c18cfa98e9
3 changed files with 14 additions and 14 deletions
  1. +5
    -5
      README.md
  2. +2
    -2
      autoload/vundle.vim
  3. +7
    -7
      autoload/vundle/installer.vim

+ 5
- 5
README.md View File

@ -54,7 +54,7 @@
```
Sample `.vimrc` For the using of `localbundle`
Sample `.vimrc` for the using of `localbundle`
```vim
@ -67,11 +67,11 @@
" set it to 1 then vundle will only adding the localbundle dir to &rtp.
let g:vundle_local = 1
" set the default localbundle directory
let g:bundle_local_dir = '~/.vim/localbundle'
let g:vundle_local_dir = '~/.vim/localbundle'
if filereadable(expand(g:bundle_local_dir)."/autoload/vundle.vim")
exe 'set rtp^='.g:bundle_local_dir
exe 'set rtp+='.g:bundle_local_dir.'/after'
if filereadable(expand(g:vundle_local_dir)."/autoload/vundle.vim")
exe 'set rtp^='.g:vundle_local_dir
exe 'set rtp+='.g:vundle_local_dir.'/after'
else
" make sure it's there
" otherwise clone it


+ 2
- 2
autoload/vundle.vim View File

@ -39,8 +39,8 @@ endif
func! vundle#rc(...) abort
let g:bundle_local_dir = exists("g:bundle_local_dir") ?
\ expand(g:bundle_local_dir) : expand('$HOME/.vim/localbundle', 1)
let g:vundle_local_dir = exists("g:vundle_local_dir") ?
\ expand(g:vundle_local_dir) : expand('$HOME/.vim/localbundle', 1)
let g:vundle_local = exists("g:vundle_local") ? g:vundle_local : 0
let g:bundle_dir = len(a:000) > 0 ? expand(a:1, 1) : expand('$HOME/.vim/bundle', 1)
let g:updated_bundles = []


+ 7
- 7
autoload/vundle/installer.vim View File

@ -255,7 +255,7 @@ func! s:log(str) abort
endf
fun! vundle#installer#localdocs() abort
call s:helptags(g:bundle_local_dir)
call s:helptags(g:vundle_local_dir)
return 'helptags'
endfun
@ -268,16 +268,16 @@ fun! s:update_local() abort "{{{
call s:log('')
call s:log('Remove dir of localbundle')
if has('win32') || has('win64')
let cmd = "rd /S /Q ".g:bundle_local_dir
let cmd = "rd /S /Q ".g:vundle_local_dir
let out = s:system(cmd)
else
let cmd = "rm -rf ".g:bundle_local_dir
let cmd = "rm -rf ".g:vundle_local_dir
endif
let out = s:system(cmd)
call s:log('$ '.cmd)
call s:log('> '.out)
call mkdir(g:bundle_local_dir, "p")
call mkdir(g:vundle_local_dir, "p")
call s:log('')
call s:log('copy to localbundle ')
@ -285,13 +285,13 @@ fun! s:update_local() abort "{{{
let dirs = split(glob(g:bundle_dir."/*/"),"\n")
for dir in dirs
exe "cd /d ".dir
let cmd = "xcopy /E /Y /C /I * ".g:bundle_local_dir
let cmd = "xcopy /E /Y /C /I * ".g:vundle_local_dir
let out = s:system(cmd)
call s:log('$ '.cmd)
call s:log('> '.out)
endfor
else
let cmd = "cp -rnl ".g:bundle_dir."/*/* ".g:bundle_local_dir
let cmd = "cp -rnl ".g:bundle_dir."/*/* ".g:vundle_local_dir
let out = s:system(cmd)
call s:log('$ '.cmd)
call s:log('> '.out)
@ -311,7 +311,7 @@ function! vundle#installer#update_local(bang,...) "{{{
\ 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',['" Update Bundle and install to '.expand(g:bundle_local_dir, 1)], names + ['LocalBundle','LocalHelptags'])
call vundle#scripts#view('Installer',['" Update Bundle and install to '.expand(g:vundle_local_dir, 1)], names + ['LocalBundle','LocalHelptags'])
call s:process(a:bang, (a:bang ? 'add!' : 'add'))


Loading…
Cancel
Save