diff --git a/vimrcs/basic.vim b/vimrcs/basic.vim index c22d30bd..1649cb95 100644 --- a/vimrcs/basic.vim +++ b/vimrcs/basic.vim @@ -432,3 +432,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