From ef855b400a84419b633a7a2f5dc1f3df094052f6 Mon Sep 17 00:00:00 2001 From: Loic Nageleisen Date: Sat, 31 Dec 2011 16:37:26 +0100 Subject: [PATCH] automatic session restore --- vimrc | 8 ++++++++ 1 file changed, 8 insertions(+) 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() +