move one more func

Tue, 23 May 2017 11:04:57 -0400

author
Meredith Howard <mhoward@roomag.org>
date
Tue, 23 May 2017 11:04:57 -0400
changeset 583
e2c2404479d3
parent 582
7ec3dc00d06d
child 584
2954f1525e0f

move one more func

.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
@@ -17,6 +17,15 @@ func! vimrc#MkNonExDir(file, buf) abort
   endif
 endfunc
 
+func! vimrc#AutoSessionConfig() abort
+  if strlen(v:servername) > 0 && match(v:servername, 'VIM') == -1
+    let g:unite_source_session_default_session_name = tolower(v:servername)
+    let g:unite_source_session_enable_auto_save = 1
+
+    UniteSessionLoad
+  endif
+endfunc
+
 func! vimrc#VundleInstallAndBegin() abort
   let l:vundle_readme = expand(g:on_windows
     \ ? '~/vimfiles/bundle/vundle/README.md'
--- a/.vimrc
+++ b/.vimrc
@@ -256,20 +256,11 @@ endif
 
 
 " Autocmds  {{{
-function! AutoSessionConfig()
-  if strlen(v:servername) > 0 && match(v:servername, 'VIM') == -1
-    let g:unite_source_session_default_session_name = tolower(v:servername)
-    let g:unite_source_session_enable_auto_save = 1
-
-    UniteSessionLoad
-  endif
-endfunction
-
 augroup vimrc
   autocmd!
 
   " set and load a session based on servername
-  autocmd VimEnter  * call AutoSessionConfig()
+  autocmd VimEnter  * call vimrc#AutoSessionConfig()
 
   " complement to autowriteall
   autocmd FocusLost * silent! wa

mercurial