From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 94457 invoked by alias); 14 Feb 2016 20:23:41 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 94436 invoked by uid 89); 14 Feb 2016 20:23:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=au, positions, H*f:sk:56C0AC9, hats X-HELO: mail.spocom.com Received: from mail.spocom.com (HELO mail.spocom.com) (206.63.224.240) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 14 Feb 2016 20:23:38 +0000 Received: from localhost (97-115-178-104.spkn.qwest.net [97.115.178.104]) by mail.spocom.com with SMTP; Sun, 14 Feb 2016 12:23:18 -0800 Date: Sun, 14 Feb 2016 20:23:00 -0000 From: Gary Johnson To: cygwin@cygwin.com Subject: Re: Vim and cursor position Message-ID: <20160214202433.GA3865@phoenix> Mail-Followup-To: cygwin@cygwin.com References: <56C0AC94.2040901@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56C0AC94.2040901@gmail.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-IsSubscribed: yes X-SW-Source: 2016-02/txt/msg00218.txt.bz2 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 " closed. " if exists("#fedora#BufRead#*") au! fedora BufRead * endif if exists("#redhat#BufRead#*") au! redhat BufRead * endif 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 as well. Regards, Gary -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple