Gerald Lai wrote:
On Sat, 17 Jun 2006, Bram Moolenaar wrote:


Gerald Lai wrote:

For Vim 7, it seems that filename completion in the :cmdline ignores
case when searching for matches. For example,

   :e F<Tab>

matches both

   foo.txt
   Foo.txt

This is different from Vim 6 where it only matches

   Foo.txt

Is there any way to revert back to the old behavior?

What system?  On MS-Windows case of filenames is ignored, on Unix it
matters, on Mac it depends.

I'm on Windows for Vim 7, Linux for Vim 6 :)

That explains it. I guess this is a matter of discrepancy between what
the user wants to match, and what the OS cares to read.

IMHO, what the user wants to match should take priority over whether the
OS cares about the case of its filenames.

Perhaps for Windows, we could have a 'smartcase' setup for filename
completion matching where it's ignorecase only when all the characters
are lowercase.

Thanks.
--
Gerald


IIUC, under Windows it is not possible to have in the same directory two files whose names differ only in case. Let's say you have "Makefile" in some directory. Creating "makefile" or "MAKEFILE" in the same directory will overwrite it. Similarly foo.c, FOO.C and Foo.C are indistinguishable. If Vim tries to open one of them, and another one exists, the OS will deliver it. Thus a 'smartcase' or 'noignorecase' setting for Windows filenames makes no sense.


Best regards,
Tony.

Reply via email to