On 5/8/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:


When opening a file in vim, the cursor will move to the last position when
the file was saved.

The "feature" is enabled by some autocommands in vimrc_example.vim, I
copied the code into my .vimrc and use it in all platform.

It really does work in my WindowsXP gvim, cygwin vim, MacOSX vim, and
Ubuntu Dapper vim.

Recently I installed Ubuntu Feisty and the "feature" seems to have gone (I
installed vim-gnome version 7.0.135). Since I use the same .vimrc in all
platform, it is unlikely to be the fault of my .vimrc script, the problem
is I do not know how to debug vim script, and I don't know why that
autocommand does not work.

Any idea where is the problem, or any hint on how to find where the problem
is?

The simplest way to fix this is to add this line to your .vimrc:

      $VIMRUNTIME/vimrc_example.vim

Another, more difficult method is documented under

    :help restore-cursor

Yakov

Reply via email to