I occasionally search through files in vim
or less
using /
or ?
but as far as I can tell, the search patterns are case sensitive.
So for example, /foo
won't find the same things that /FOO
will. Is there an way way to make it less strict? How can I search in vim
or less
for a pattern that is NOT case sensitive?
less
searches are case insensitive unless you use a string that contains an upper case letter. So,foo
will matchFoo
andFoO
butFoo
will only matchFoo
and notfoo
etc. Also see here: less is always case-insensitive. – terdon Mar 24 '15 at 17:48less
behave that way but I suppose that's a topic for another day. Thanks! – Mike B Mar 24 '15 at 17:51less
from your question since that is covered quite nicely in the other posts and the answers you've received explain how to do it in vi. – terdon Mar 24 '15 at 17:53less
andvi
and that info is valuable. – Mike B Mar 24 '15 at 18:03vim
(even though I'm typingvi
). Apologies for the confusion. – Mike B Mar 24 '15 at 22:54