vimvimgrep

vimgrep case insensitive file pattern


I use the following vimgrep command:

lv /pattern/ ./**/partoffilename*.coffee

as you already know we can add \c anywhere in the pattern to search case insensitively:

lv /pattern\c/ ./**/partoffilename*.coffee

but that doesn't work for file name pattern:

lv /pattern\c/ ./**/partoffilename*\c.coffee     <- won't work

So the question is how can I force vimgrep to search case insensitively not just in file content but in file names as well (i.e. to search not just in partoffilename*.coffee but also in PartOfFileName*.coffee, partOfFileName*.coffee, ...) ?


Solution

  • I think, in you need to set the 'wildignorecase' option and make sure, that the 'fileignorecase' option is not set.