Monday, May 10, 2010

Re: Automatic sessions

On Mon, May 10, 2010 at 10:43:26PM -0500, sc wrote:
> it sounds to me as if the oS install had sourced the
> $VIMRUNTIME/vimrc_example.vim, which contains the following code:
>
> " When editing a file, always jump to the last known cursor
> position.
> " Don't do it when the position is invalid or when inside an
> event handler
> " (happens when dropping a file on gvim).
> " Also don't do it when the mark is in the first line, that is
> the default
> " position when opening a file.
> autocmd BufReadPost *
> \ if line("'\"") > 1 && line("'\"") <= line("$") |
> \ exe "normal! g`\"" |
> \ endif
>
> you can either source that same file (dangerous in my opinion) or
> add the above code to your .vimrc
Thanks. This is basically the same as in ':help line()' and does the job
once added to .vimrc.

Best,
Udo

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: