Enabling CASE_INSENSITIVE_FILENAME in UN*X and get away with it?

7 views
Skip to first unread message

Mikael Jansson

unread,
Sep 19, 2007, 11:17:37 AM9/19/07
to vim...@vim.org
Heya,

I enabled CASE_INSENSITIVE_FILENAME on my Linux box, which works in
almost all cases, except when you try to save a file and there already
exists a file differing only in case.

An example:

$ vim Foo<CR>
iThe file Foo<Esc>:w foo

... at which point Vim responds with ["Foo" 1L, 13C written].

Esentially, I just want it to be enabled when I do filesystem completion
-- just like readline's completion-ignore-case. However, I can't make
much sense of os_unix.c / misc1.c. Could anyone help me by pointing me
in the right direction?

Thanks in advance,
Mikael

ap

unread,
Sep 19, 2007, 1:46:18 PM9/19/07
to vim_dev

Maybe this is worth a try :

misc1.c / unix_expandpath()

8962 /* compile the regexp into a program */
8963 #if 1 //def CASE_INSENSITIVE_FILENAME
8964 regmatch.rm_ic = TRUE; /* Behave like
Terminal.app */
8965 #else
8966 regmatch.rm_ic = FALSE; /* Don't ever ignore case
*/
8967 #endif

-ap

Mikael Jansson

unread,
Sep 20, 2007, 4:25:54 AM9/20/07
to vim...@googlegroups.com

>> Esentially, I just want it to be enabled when I do filesystem completion
>> -- just like readline's completion-ignore-case. However, I can't make
>> much sense of os_unix.c / misc1.c. Could anyone help me by pointing me
>> in the right direction?
>>
>> Thanks in advance,
>> Mikael
>
> Maybe this is worth a try :
>
> misc1.c / unix_expandpath()
>
> 8962 /* compile the regexp into a program */
> 8963 #if 1 //def CASE_INSENSITIVE_FILENAME
> 8964 regmatch.rm_ic = TRUE; /* Behave like
> Terminal.app */
> 8965 #else
> 8966 regmatch.rm_ic = FALSE; /* Don't ever ignore case
> */
> 8967 #endif
>
Thanks, that worked wonders!

How about making this an option somewhere? Any objections?

-- Mikael

Reply all
Reply to author
Forward
0 new messages