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