delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/11/03/20:00:41

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
Message-ID: <436AB29C.60108@mscha.org>
Date: Fri, 04 Nov 2005 02:00:12 +0100
From: Michael Schaap <cygwin AT mscha DOT org>
Reply-To: cygwin AT cygwin DOT com
User-Agent: Thunderbird 1.4.1 (Windows/20051006)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: VIM - Vi IMproved 6.4 (2005 Oct 15, compiled Oct 17 2005 11:54:34
References: <A4E3891E681AC442BDC781C89393235901BFD874 AT d10sm004 DOT de10 DOT cocreate DOT com> <20051020144227 DOT GB28514 AT trixie DOT casa DOT cgf DOT cx> <436AAD58 DOT 3030109 AT mscha DOT org> <Pine DOT GSO DOT 4 DOT 63 DOT 0511031947280 DOT 12166 AT slinky DOT cs DOT nyu DOT edu>
In-Reply-To: <Pine.GSO.4.63.0511031947280.12166@slinky.cs.nyu.edu>
X-IsSubscribed: yes

On 4-Nov-2005 1:49, Igor Pechtchanski wrote:
> On Fri, 4 Nov 2005, Michael Schaap wrote:
>
>   
>> On 20-Oct-2005 16:42, Christopher Faylor wrote:
>>     
>>> On Thu, Oct 20, 2005 at 04:15:34PM +0200, Christoph Jeksa wrote:
>>>
>>>       
>>>> there is a bug in this version:
>>>>
>>>> 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 behavior is very nasty if such file is used by programs
>>>> which are case-sensitive for file names, example: SCM program perforce.
>>>>         
>>> This isn't a vim problem.  Windows filename handling is case-insensitive.
>>>
>>> I suppose that there could be a vim option to deal with this case but
>>> that would require modifying vim, i.e., PTC* by the upstream vim
>>> developers.
>>>       
>> Actually, there already is such an option...
>>
>>     $ touch X
>>     $ ls -l
>>     total 0
>>     -rw-r--r--  1 mscha None 0 Nov  4 01:29 X
>>     $ vim x
>>     :wq!
>>     $ ls -l
>>     total 0
>>     -rw-r--r--  1 mscha None 0 Nov  4 01:30 x
>>     $ rm x
>>     $ touch X
>>     $ vim -c 'set backupcopy=yes' x
>>     :wq!
>>     $ ls -l
>>     total 0
>>     -rw-r--r--  1 mscha None 0 Nov  4 01:30 X
>>
>> See ":help backupcopy" for details.  It defaults to "auto", which is
>> kinda unpredictable.  Set it to "yes", and it might be a bit slower, but
>> won't mess with your case.  :-)
>>     
>
> More interestingly, ":help backupcopy" says:
>
> (Vi default for Unix: "yes", otherwise: "auto")
>
> This means that VIm treats Cygwin as non-Unix.  Shouldn't the Cygwin
> default be the same as for Unix?
>   
Good point, I missed that...

Actually, it turns out that Cygwin *does* use the UNIX default. 
However, when 'compatible' is not set (e.g. when a .vimrc exists) it
sets backupcopy=auto.  (See ":help compatible")
That explains the varying experiences in this mailing list...

 - Michael

--
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