# HG changeset patch # User Meredith Howard # Date 1495500748 14400 # Node ID 0cb7adee16fe05458143182dd875481d44e918ee # Parent 3e4703eef23d2b89bd2cb46a551c8f1624b899f4 move begin into function too diff --git a/.vim/autoload/vimrc.vim b/.vim/autoload/vimrc.vim --- 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 diff --git a/.vimrc b/.vimrc --- 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('') " 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'