summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--init.vim15
1 files changed, 15 insertions, 0 deletions
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 <buffer> <silent> <End> <C-o>g<End>
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 <F2> :wa<Bar>call SaveSession()<CR>:so ~/.vim/sessions/