commit 9a78b30c58a2563b79f8d73ddfaa4cffebbd526c
parent 8041535ad26d5508ba060f5cc604db0c13861c6c
Author: Janis Pagel <janis.pagel@ims.uni-stuttgart.de>
Date: Thu, 12 Jul 2018 18:55:48 +0200
Make vim remember last position when opening file
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/vimrc b/vimrc
@@ -19,6 +19,11 @@ set nocompatible
set wildmode=longest,list,full
set wildmenu
+" reopening a file at same position
+if has("autocmd")
+ au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
+endif
+
" vim-plug section
call plug#begin('~/.vim/plugged')
Plug 'vimwiki/vimwiki'