Perform case insensitive searches in vi or vim
The default behavior of searches in vi/vim is case sensitive. A simple setting allows case insensitive searches.
By default, the following search string entered in command mode will find only instances of Tech-Recipes which match the upper and lower case exactly:
/Tech-Recipes
To ignore case in the searches, enter the following command:
:set ignorecase
This command can be abbreviated :set ic. To turn off this feature, use:
:set noignorecase









Aaron said on January 27, 2010
Likewise, I’ve just figured :set ignorecase can be abbreviated as
:set ic
Mini said on June 15, 2010
Great ! Just can’t figure out how come I’ve never looked for this before !!
Guest said on August 10, 2010
It looks as if backslashes are being eaten by the comment engine.
That is:
[slash]expression[backslash]c
i.e., add a backslash c anywhere in your search expression. Usually people add it at the end for readability.
Amit Verma said on August 18, 2010
Great help indeed (In Comment section as well).
Thank you all, fellows..
Johnny said on May 18, 2011
Thanks for correcting the previous answerÂ