diff --git a/cfg/80-restore-line.vim b/cfg/80-restore-line.vim new file mode 100644 index 0000000..acea637 --- /dev/null +++ b/cfg/80-restore-line.vim @@ -0,0 +1,13 @@ +" Return to last edited line when a file is re-opened +augroup RememberLine + autocmd! + autocmd BufReadPost * + \ if line( "'\"" ) > 0 && line( "'\"" ) <= line( "$" ) + \ && &filetype != "svn" + \ && &filetype != "gitcommit" + \ && &filetype != "gitrebase" + \ && &filetype != "hgcommit" + \ && &filetype != "cvs" | + \ execute 'normal! g`"zvzz' | + \ endif +augroup END