# HG changeset patch # User zegervdv # Date 1394656540 -3600 # Node ID 17afab9bd228e18a5fa6bdce0f004ab6775f9cb4 # Parent 4e87e8610500adb7ecc58a9eb77d7defd6426a45 Open vim at last known position diff -r 4e87e8610500 -r 17afab9bd228 Rakefile --- a/Rakefile Mon Mar 10 20:38:49 2014 +0100 +++ b/Rakefile Wed Mar 12 21:35:40 2014 +0100 @@ -6,3 +6,5 @@ sh 'git submodule foreach git checkout master' sh 'git submodule foreach git pull --rebase' end + +task up: :update diff -r 4e87e8610500 -r 17afab9bd228 vimrc --- a/vimrc Mon Mar 10 20:38:49 2014 +0100 +++ b/vimrc Wed Mar 12 21:35:40 2014 +0100 @@ -64,6 +64,15 @@ set clipboard=unnamed +set viminfo='10,\"100,:20,%,n~/.viminfo + +" When editing a file, always jump to the last known cursor position. +" Don't do it for commit messages, when the position is invalid, or when +" inside an event handler (happens when dropping a file on gvim). +autocmd BufReadPost * + \ if &ft != 'gitcommit' && line("'\"") > 0 && line("'\"") <= line("$") | + \ exe "normal g`\"" | + \ endif map d :bpspbnbd