summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2020-09-25 11:53:07 +0200
committerHarald Eilertsen <haraldei@anduin.net>2020-09-25 11:53:07 +0200
commitd3a89ad66207c96cd8957a08a54899c9673a3068 (patch)
tree0c3db89c1c69254335173af31248e34e2387b2d3
parent7b7be7912c3e974b4a13e803a402b3dfb5a4d0dc (diff)
downloadnvimrc-master.tar.gz
nvimrc-master.tar.bz2
nvimrc-master.zip
Add primitive 'session' support.HEADmaster
-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/