Skip to content

Instantly share code, notes, and snippets.

@nelstrom
Created May 12, 2010 14:16
Show Gist options
  • Save nelstrom/398633 to your computer and use it in GitHub Desktop.
Save nelstrom/398633 to your computer and use it in GitHub Desktop.
if has("autocmd")
" This is probably in your .vimrc already. No need to duplicate!
filetype plugin indent on
" When editing a file, always jump to the last known cursor position.
autocmd BufReadPost *
\ if line("'\"") > 1 && line("'\"") <= line("$") |
\ exe "normal! g`\"" |
\ endif
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment