regexvimgrepcscope

Cscope insensitive search


I am trying to do a case insentive search in vim with cscope. For example:

:cs find e regexp

Should find regexp, REGEXP, Regexp and so on... How can I do this? I've been trying the (?i) in front of the expression, but that didn't help.


Solution

  • :cs find e expects an egrep pattern. Since egrep is not case-insensitive by default there's no reason to expect the pattern regexp to match regexp, REGEXP, etc.

    Also, egrep doesn't honor (?i).

    To make cscope's search (all search methods, not only egrep) case-insensitive by default, you must add the -C flag to your initialization command:

    :cscope add cscope.out -C