Skip to content

Instantly share code, notes, and snippets.

@eiwe
Created April 24, 2012 15:08
Show Gist options
  • Save eiwe/2480401 to your computer and use it in GitHub Desktop.
Save eiwe/2480401 to your computer and use it in GitHub Desktop.
Vimrc snippet to jump to the last cursor position in a file when you open it again
" Jump to the last cursor position
autocmd BufReadPost *
\ if line("'\"") > 1 && line("'\"") <= line("$") |
\ exe "normal! g`\"" |
\ endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment