delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/10/20/17:19:12

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
To: cygwin AT cygwin DOT com
From: Shankar Unni <shankarunni AT netscape DOT net>
Subject: Re: VIM - Vi IMproved 6.4 (2005 Oct 15, compiled Oct 17 2005 11:54:34
Date: Thu, 20 Oct 2005 14:16:17 -0700
Lines: 31
Message-ID: <dj91f2$rbd$1@sea.gmane.org>
References: <A4E3891E681AC442BDC781C89393235901BFD874 AT d10sm004 DOT de10 DOT cocreate DOT com> <20051020144227 DOT GB28514 AT trixie DOT casa DOT cgf DOT cx>
Mime-Version: 1.0
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050908 Thunderbird/1.4 Mnenhy/0.7.2.0
In-Reply-To: <20051020144227.GB28514@trixie.casa.cgf.cx>
X-IsSubscribed: yes

Christopher Faylor wrote:
> On Thu, Oct 20, 2005 at 04:15:34PM +0200, Christoph Jeksa wrote:

>> Supposed, you have a file X.sh ( exactly in this spelling ).  If you
>> enter:
>>
>> vim x.sh ( also exactly in this spelling )
>>
>> and write it back after any modification, the file will be renamed even
>> to x.sh.  

> This isn't a vim problem.  Windows filename handling is case-insensitive.

But I think it's worth mentioning that 6.3 doesn't do this (change the 
case of the name when writing back). It overwrites the old file when 
writing back, thus preserving its case.

I'm guessing 6.4 has been fixed to move the old file out of the way 
before writing the new file, and you thus end up with the file name in 
the same case as the command line.

Anyway, the use case is illegitimate, so basically, there is no *bug* in 
Vim behaving either way - it's just undocumented behavior that has changed.

Don't mix cases like this ..

(P.S. The other way that certain other editors (e.g. Emacs) deal with 
this, is that they normalize the file name case when they load a file 
into a buffer, by getting the "real path name" of the file - that way, 
even if the rename the old file and create a new one, it'll be created 
in the right case.)


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019