Loading ...
Sorry, an error occurred while loading the content.

RE: Returning to same line

Expand Messages
  • David Fishburn
    Ahh, that is exactly what I have wanted... Thanks, Bram! ... From: Bram@moolenaar.net [mailto:Bram@moolenaar.net] This is what I use myself: When editing a
    Message 1 of 5 , Jan 2, 2003
    • 0 Attachment
      Ahh, that is exactly what I have wanted...

      Thanks, Bram!

      -----Original Message-----
      From: Bram@... [mailto:Bram@...]

      This is what I use myself:

      " When editing a file, always jump to the last known cursor position.
      autocmd BufReadPost *
      \ if line("'\"") > 0 && line("'\"") <= line("$") |
      \ exe "normal g`\"" |
      \ let b:doopenfold = 1 |
      \ endif
      " Need to postpone using "zv" until after reading the modelines.
      autocmd BufWinEnter *
      \ if exists("b:doopenfold") |
      \ unlet b:doopenfold |
      \ exe "normal zv" |
      \ endif
    Your message has been successfully submitted and would be delivered to recipients shortly.