Mon, 22 May 2017 20:52:28 -0400
move begin into function too
.vim/autoload/vimrc.vim | file | annotate | diff | comparison | revisions | |
.vimrc | file | annotate | diff | comparison | revisions |
--- a/.vim/autoload/vimrc.vim +++ b/.vim/autoload/vimrc.vim @@ -19,7 +19,7 @@ function! vimrc#MkNonExDir(file, buf) ab endif endfunction -function! vimrc#VundleInstall() abort +function! vimrc#VundleInstallAndBegin() abort let l:vundle_readme = expand(g:on_windows \ ? '~/vimfiles/bundle/vundle/README.md' \ : '~/.vim/bundle/vundle/README.md') @@ -40,4 +40,12 @@ function! vimrc#VundleInstall() abort echo "Installed Vundle, run :PluginInstall if desired" endif + + if g:on_windows + set rtp+=~/vimfiles/bundle/vundle/ + call vundle#begin('~/vimfiles/bundle') + else + set rtp+=~/.vim/bundle/vundle/ + call vundle#begin() + endif endfunction
--- a/.vimrc +++ b/.vimrc @@ -1,6 +1,5 @@ " vim: et sts=2 sw=2 " vim: fdm=marker - set nocompatible " on windows and not cygwin @@ -8,15 +7,7 @@ let g:on_windows = (has('win32') || has( let s:filename = expand('<sfile>') " Set up Vundle and plugins {{{ - call vimrc#VundleInstall() - - if g:on_windows - set rtp+=~/vimfiles/bundle/vundle/ - call vundle#begin('~/vimfiles/bundle') - else - set rtp+=~/.vim/bundle/vundle/ - call vundle#begin() - endif + call vimrc#VundleInstallAndBegin() Plugin 'gmarik/vundle'