diff --git a/vimrcs/basic.vim b/vimrcs/basic.vim index 198daa4b..fa7059e5 100644 --- a/vimrcs/basic.vim +++ b/vimrcs/basic.vim @@ -429,3 +429,8 @@ function! BufcloseCloseIt() execute("bdelete! ".l:currentBufNum) endif endfunction + +" Make VIM remember position in file after reopen +if has("autocmd") + au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif +endif