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

Re: how to comfig vim to hold the position that last access?



cwinl wrote:
hi all, vim in redhat can 'remember' the position that you open a file last time. how to config vim in debian to do the same thing?

Check :help position
<                                           *last-position-jump*
        This autocommand jumps to the last known position in a file
        just after opening it, if the '" mark is set: >
   :au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
| exe "normal g'\"" | endif:

See also :help au

If you add :autocmd!, be sure to include it at the start, not end
of your .vimrc.

dircha



Reply to: