3

How can I make Vim's filename completion case-sensitive?

The following behavior is very annoying: If I type liTab (all lowercase), Vim completes to LICENSES, but what I really want is to complete to lib:

completion

Apparently setting nowildignorecase should do the trick, but I tried that. I'm using Mac OS X 10.8 with an HFS+ filesystem and I apparently have a a system where file name case is generally ignored:

'wildignorecase':
When set case is ignored when completing file names and directories.
Has no effect on systems where file name case is generally ignored.
Does not apply when the shell is used to expand wildcards, which
happens when there are special characters.

Is there any way to fix this?

2 Answers 2

1

How to make your file system case-sensitive:

Back everything up on the file system in question (the one you'll be making case-sensitive), because you'll need to reformat the drive.

Go into Disk Utility and select the volume in question.

Make sure that it is formatted Mac OS Extended (Case-sensitive, Journaled).

Then recover from the backup.

Know that some programs may behave erratically when forced to consider case sensitivity. Case sensitivity is not a standard, and some software sees

THIs

the same as

this

and doesn't know how to handle it when the filesystem forces it.

enter image description here

3
  • 3
    The effort you took to answer this is appreciated, but I don't think formatting my boot volume is a reasonable solution to fix my editor :) Dec 27, 2012 at 4:24
  • I completely agree with you (about not formatting your computer). What I was trying to show was where and how you cause the file system to be case sensitive. What I wanted to demonstrate, is that (to the best of my knowledge) there isn't a fix with regard to making changes to the file system eliminating that as an answer.
    – Everett
    Dec 27, 2012 at 4:26
  • @Everett, I've just bumped googling here. My filesystem is case sensitive, but vim tries to do the same ;-) Mar 21, 2014 at 18:22
1

I found this post while trying to find a solution for this myself. Kept on looking and eventually found this in the documentation for wildignorecase and it works for me:

:set nofileignorecase
1
  • 1
    Thanks! Ten years old and still a relevant question... Jul 15, 2022 at 12:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .