From: Simon Ruderich Date: Wed, 29 Jul 2009 13:48:41 +0000 (+0200) Subject: vimrc: Go to last position of opened files. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=4cbecee3efa4fd81b5c7cd4efb85fe06ed927293;p=config%2Fdotfiles.git vimrc: Go to last position of opened files. --- diff --git a/vimrc b/vimrc index 10f0620..5be58ef 100644 --- a/vimrc +++ b/vimrc @@ -228,6 +228,12 @@ if has('autocmd') augroup vimrc autocmd! +" Go to last position of opened files. Taken from :help last-position-jump. + autocmd BufReadPost * + \ if line("'\"") > 1 && line("'\"") <= line("$") | + \ execute "normal! g'\"" | + \ endif + " Use diff filetype for mercurial patches in patch queue. autocmd BufReadPost */.hg/patches/* set filetype=diff