Jacob Friis Larsen, Fri, Aug 20, 2004 at 03:29:43PM +0200: 
> How do I make vi remember where I was and start at that position?
> 

from /usr/share/vim/vim60/macros/vimrc on a RHEL box:

" Only do this part when compiled with support for autocommands
if has("autocmd")
  " When editing a file, always jump to the last cursor position
  autocmd BufReadPost *
  \ if line("'\"") > 0 && line ("'\"") <= line("$") |
  \   exe "normal g'\"" |
  \ endif
endif


Attachment: pgpKwPnr97yTa.pgp
Description: PGP signature

Reply via email to