I have long time missed in Unix VIM one small feature, which is
available in windows GVIM - "case insensitive buffer names
completion". Therefore this patch.
Description:
Assuming two buffers are opened in VIM
path/to/TMaster.java
path/to/TSlave.java
On windows, :b tma<TAB> finds TMaster
On Unix, only :b TMa<TAB> finds, :b tma<TAB> finds nothing.
Patch enables windows behavior (case insensitive buffer names
completion) on Unix as well.
See also following thread in vim_use mailing list:
PS: To make the patch ready for the mainline, case sensitivity on
buffer completion should not be just always "off", it must be
controlled by a new option: for example 'ignorebuffercase'
(analog with 'ignorefilecase' from TODO). Although TODO list
already contains proposal for the similar 'ignorefilecase'
option, in my opinion it is better to made the extra option for
buffer names case sensitivity.
--
Anton
*** src/buffer.c.orig 2009-09-25 21:29:04.000000000 +0200
--- src/buffer.c 2009-09-25 21:29:17.000000000 +0200
***************
*** 2271,2277 ****
if (name != NULL)
{
regmatch.regprog = prog;
! #ifdef CASE_INSENSITIVE_FILENAME
regmatch.rm_ic = TRUE; /* Always ignore case */
#else
regmatch.rm_ic = FALSE; /* Never ignore case */
--- 2271,2279 ----
if (name != NULL)
{
regmatch.regprog = prog;
! /* always ignore case for :buf buf*name command
! * completion */
! #if (1)
regmatch.rm_ic = TRUE; /* Always ignore case */
#else
regmatch.rm_ic = FALSE; /* Never ignore case */