Skip to content

Instantly share code, notes, and snippets.

@shvechikov
Created July 6, 2010 15:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shvechikov/465495 to your computer and use it in GitHub Desktop.
Save shvechikov/465495 to your computer and use it in GitHub Desktop.
Vim: Return to last edit position
" Put to .vimrc
" Return to last edit position (You want this!) *N*
autocmd BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "normal! g`\"" |
\ endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment