.vim/autoload/vimrc.vim

changeset 606
37b21dd61717
parent 586
ab5763bb6ca7
child 607
042360ae89bb
equal deleted inserted replaced
605:96cef8773963 606:37b21dd61717
30 UniteSessionLoad 30 UniteSessionLoad
31 endif 31 endif
32 endfunc 32 endfunc
33 33
34 func! vimrc#VundleInstallAndBegin() abort 34 func! vimrc#VundleInstallAndBegin() abort
35 let l:vundle_readme = expand(g:on_windows 35 if !filereadable(g:myvim . '/bundle/vundle/README.md')
36 \ ? '~/vimfiles/bundle/vundle/README.md'
37 \ : '~/.vim/bundle/vundle/README.md')
38
39 if !filereadable(l:vundle_readme)
40 if !executable('git') 36 if !executable('git')
41 echo "Can't autoinstall Vundle without git" 37 echo "Can't autoinstall Vundle without git"
42 return 38 return
43 endif 39 endif
44 40
45 if g:on_windows == 0 41 try
46 silent !mkdir -p ~/.vim/bundle 42 call mkdir(g:myvim . '/bundle', 'p')
47 silent !git clone --depth 1 https://github.com/gmarik/vundle ~/.vim/bundle/vundle 43 catch
48 else 44 endtry
49 silent execute '!mkdir "'. $HOME .'\vimfiles\bundle"' 45 exec 'cd ' . g:myvim . '/bundle'
50 silent execute '!git clone --depth 1 https://github.com/gmarik/vundle "'. $HOME .'\vimfiles\bundle\vundle"' 46 silent !git clone --depth 1 https://github.com/gmarik/vundle
51 endif 47 cd -
52 48
53 echo "Installed Vundle, run :PluginInstall if desired" 49 echo "Installed Vundle, run :PluginInstall if desired"
54 endif 50 endif
55 51
56 if g:on_windows 52 let &rtp .= ',' . g:myvim . '/bundle/vundle'
57 set rtp+=~/vimfiles/bundle/vundle/ 53 call vundle#begin(g:myvim . '/bundle')
58 call vundle#begin('~/vimfiles/bundle')
59 else
60 set rtp+=~/.vim/bundle/vundle/
61 call vundle#begin()
62 endif
63 endfunc 54 endfunc

mercurial