what "feature" is required to return to last editing position?

2007-05-09 Thread panshizhu
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 U

Re: what "feature" is required to return to last editing position?

2007-05-09 Thread Yakov Lerner
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 doe

Re: what "feature" is required to return to last editing position?

2007-05-09 Thread Micah Cowan
Yakov Lerner wrote: > 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 simplest way to fix this is to add this line to your .vimrc: > > $VIMRUNTIME/vimrc_example.vim

Re: what "feature" is required to return to last editing position?

2007-05-09 Thread A.J.Mechelynck
[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, cyg

Re: what "feature" is required to return to last editing position?

2007-05-09 Thread François Ingelrest
Hello, I'm also using vim with an Ubuntu Feisty. Here is what I have in my .vimrc: " Try to restore cursor position when reading a buffer au BufReadPost * if line("'\"") | exe "normal '\"" | endif It works quite well. On 5/9/07, A.J.Mechelynck <[EMAIL PROTECTED]> wrote: [EMAIL PROTECTED] wrot

Re: what "feature" is required to return to last editing position?

2007-05-09 Thread A.J.Mechelynck
François Ingelrest wrote: Hello, I'm also using vim with an Ubuntu Feisty. Here is what I have in my .vimrc: " Try to restore cursor position when reading a buffer au BufReadPost * if line("'\"") | exe "normal '\"" | endif It works quite well. Yeah, that is almost the same as the code in the

Re: what "feature" is required to return to last editing position?

2007-05-09 Thread Charles E Campbell Jr
[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, cyg

Re: what "feature" is required to return to last editing position?

2007-05-09 Thread panshizhu
Vincent BEFFARA <[EMAIL PROTECTED]> 写于 2007-05-09 23:54:27: > Hi, > > >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 prob

Re: what "feature" is required to return to last editing position?

2007-05-09 Thread Micah Cowan
[EMAIL PROTECTED] wrote: > Vincent BEFFARA <[EMAIL PROTECTED]> 写于 2007-05-09 23:54:27: >> Hi, 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 fau

Re: what "feature" is required to return to last editing position?

2007-05-10 Thread Micah Cowan
Copying the dev list. The missing context is that running vim via sudo before having run it as regular user, causes permission problems with the created .viminfo file (and others?). Vincent BEFFARA wrote: >>> Wonderful, the problem really is about permission of .viminfo! >>> >>> I noticed that you

Re: what "feature" is required to return to last editing position?

2007-05-10 Thread Bram Moolenaar
Micah Cowan wrote: > Copying the dev list. The missing context is that running vim via sudo > before having run it as regular user, causes permission problems with > the created .viminfo file (and others?). > > Vincent BEFFARA wrote: > >>> Wonderful, the problem really is about permission of .vi

Re: what "feature" is required to return to last editing position?

2007-05-10 Thread Micah Cowan
Bram Moolenaar wrote: > Micah Cowan wrote: >> Vincent BEFFARA wrote: >>> However, it would be nice of vim to always test that it owns the $HOME >>> directory before creating files there. Would it break anything ? >> I think this would be a good idea as well. One could argue that if we >> reason thi

Re: what "feature" is required to return to last editing position?

2007-05-14 Thread fREW
On 5/10/07, Micah Cowan <[EMAIL PROTECTED]> wrote: Bram Moolenaar wrote: > Micah Cowan wrote: >> Vincent BEFFARA wrote: >>> However, it would be nice of vim to always test that it owns the $HOME >>> directory before creating files there. Would it break anything ? >> I think this would be a good i