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.less
behave that way but I suppose that's a topic for another day. Thanks!less
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.less
andvi
and that info is valuable.vim
(even though I'm typingvi
). Apologies for the confusion.