Cscope insensitive search

3.7k views Asked by At

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.

2

There are 2 answers

3
romainl On BEST ANSWER

: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
0
lubgr On

For me, romainl's answer didn't work. Instead,

set csprg=cscope\ -C

did the job.