From d3a89ad66207c96cd8957a08a54899c9673a3068 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Fri, 25 Sep 2020 11:53:07 +0200 Subject: Add primitive 'session' support. --- init.vim | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/init.vim b/init.vim index 05e4b79..d8d7d06 100644 --- a/init.vim +++ b/init.vim @@ -1,3 +1,5 @@ +" Neovim init file for Harald Eilertsen +" filetype on syntax on colorscheme nord "substrata @@ -67,3 +69,16 @@ function ToggleWrap() inoremap g endif endfunction + +" Suppress excessive tex errors +let g:tex_no_error=1 + +function SaveSession() + if !empty(v:this_session) + echo "Saving session " . v:this_session + execute "mksession! " . v:this_session + endif +endfunction + +autocmd VimLeave * :call SaveSession() +:nmap :wacall SaveSession():so ~/.vim/sessions/ -- cgit v1.2.3