28

I recently noticed how to configure bash to do case-insensitive filename completion (in /etc/inputrc, add: set completion-ignore-case on), now how do I get this in vim?

tshepang
  • 12,111
  • 21
  • 91
  • 136
Vincent Scheib
  • 17,142
  • 9
  • 61
  • 77
  • 2
    Huh I thought that was default and was mildly bothered by it; both gVim on Windows and MacVim do case-insensitive filename completion. – dash-tom-bang Sep 10 '10 at 17:45
  • 1
    @dash-tom-bang both in windows and in mac case does not matter (though, as I know, you can alter it in mac). On linux it does. – ZyX Sep 10 '10 at 19:35

2 Answers2

60

Try

:set wildignorecase

I believe it is a pretty new feature, I have it working in the latest vim build(7.3.107)

see here.

Sampajano
  • 835
  • 9
  • 7
  • 2
    Perfect. For people who want to put this in their vimrc, you might want to test for the feature first. Copy-and-pasteable version: https://gist.github.com/3372724 – jakar Aug 16 '12 at 19:16
  • 1
    This works only for file name completions on the command line (`:`). Doesn't work with file name completions in insert mode (`^X^F`), which is still case-sensitive. – sharat87 Jan 10 '13 at 14:43
3

Looks like it's not supported yet. It appears in vim's todo list :help todo search for CASE_INSENSITIVE_FILENAME (with priority "next release"):

8 Some file systems are case-sensitive, some are not. Turn CASE_INSENSITIVE_FILENAME into an option, at least for completion.

Anyway, if you don't care to rebuild vim from source then you can try this patch: http://osdir.com/ml/vim_dev/2009-09/msg00006.html

(Haven't tried it, so I cannot guarantee that it will solve your problem. Sorry)

AmirW
  • 816
  • 9
  • 20