move begin into function too

Mon, 22 May 2017 20:52:28 -0400

author
Meredith Howard <mhoward@roomag.org>
date
Mon, 22 May 2017 20:52:28 -0400
changeset 579
0cb7adee16fe
parent 578
3e4703eef23d
child 580
5a9e9be223f0

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'
 

mercurial