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:


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:

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?


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


the same as


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

enter image description here

  • 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 :) – a paid nerd Dec 27 '12 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 '12 at 4:26
  • @Everett, I've just bumped googling here. My filesystem is case sensitive, but vim tries to do the same ;-) – Michael Krelin - hacker Mar 21 '14 at 18:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.