Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 30th, 2012  |  syntax: None  |  size: 0.38 KB  |  hits: 15  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. " 5.5. How do I configure Vim to open a file at the last edited location?
  2. " Vim stores the cursor position of the last edited location for each buffer
  3. " in the '"' register. You can use the following autocmd in your .vimrc or
  4. " .gvimrc file to open a file at the last edited location:
  5. au BufReadPost *
  6.   \ if line("'\"") > 0 && line("'\"") <= line("$") |
  7.   \   exe "normal g`\"" |
  8.   \ endif