This is the mail archive of the
mailing list for the Cygwin project.
Re: Vim and cursor position
- From: Gary Johnson <garyjohn at spocom dot com>
- To: cygwin at cygwin dot com
- Date: Sun, 14 Feb 2016 12:24:33 -0800
- Subject: Re: Vim and cursor position
- Authentication-results: sourceware.org; auth=none
- References: <56C0AC94 dot 2040901 at gmail dot com>
On 2016-02-14, James Darnley wrote:
> To the maintainer, Yaakov, or anyone else who knows:
> Have the compilation options of Vim changed recently? Is there some
> other recent change that would cause the behaviour described below?
> Vim now appears to be remembering the last position of the cursor when
> you open files. I notice it most when running 'git commit', the cursor
> never starts on the first line but would appear to be where ever I ended
> the previous message.
> I find this jolly annoying.
> I would appreciate any insights people can offer.
Recent releases of the Cygwin Vim package (starting with 7.4.1179-1,
2016-01-29) have included Red Hat's or Fedora's /etc/vimrc, which is
loaded first when starting Vim. That file contains a BufReadPost
autocommand to do what you observe.
I don't like it, either, so I have this in my ~/.vimrc:
" Remove the (annoying) /etc/vimrc autocommand that positions
" the cursor " to the location it last had when the file was
au! fedora BufRead *
au! redhat BufRead *
For Cygwin, you need only one of those, but I'm at home, my Cygwin
installation is at work, and I don't remember whether Cygwin uses
the Fedora or the Red Hat version of /etc/vimrc.
You may want to take a look at /etc/vimrc and see if it makes any
other settings you find undesirable and undo them in your ~/.vimrc
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple