Created
April 24, 2012 15:08
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" 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