diff --git a/vimrc b/vimrc index 99f295a..913c1a9 100644 --- a/vimrc +++ b/vimrc @@ -224,3 +224,11 @@ augroup resCur endif augroup END +" restore session if Session.vim exists +function! RestoreSession() + if argc() == 0 && filereadable("Session.vim") "vim called without arguments + execute 'source Session.vim' + end +endfunction +autocmd VimEnter * call RestoreSession() +