Skip to content

Instantly share code, notes, and snippets.

@rhysd
Last active January 3, 2016 10:58
Show Gist options
  • Save rhysd/8452671 to your computer and use it in GitHub Desktop.
Save rhysd/8452671 to your computer and use it in GitHub Desktop.
" カーソル位置の復元(git commit のときだけは動かさない)
augroup restore-cursor
autocmd!
autocmd BufReadPost *
\ if line("'\"") > 1 && line("'\"") <= line("$") && &ft !=# 'gitcommit' |
\ exe "normal! g`\"" |
\ endif
augroup END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment