[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Make vi remember where I was



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: pgpMWxF_G8Gdv.pgp
Description: PGP signature


Reply to: