Created
July 1, 2015 19:31
-
-
Save iansinnott/06d18951bc086994a205 to your computer and use it in GitHub Desktop.
Vim Stuff
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
" When opening a buffer open to the last line where the cursor was when | |
" exiting. See :help last-position-jump for more. | |
" NOTE: This opens with the cursor in the correct spot, but does not | |
" automcatically open folds. | |
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
I'd add a
if &filetype !~ '^git\c' &&
to the if statement, that way you don't get that for gitcommit messages and git related files.