How do I do a case-insensitive search in vi/vim?

Author: Alvin J. Alexander, devdaily.com

Using the vi (or vim) editor you can perform a case-insensitive search by executing this command:

:set ignorecase

If you're not familiar with the colon commands, when you type the ":" character you'll see focus switch to the last line of the vi editor. Then the actual command (in this case set ignorecase) follows that. (Also, press [Enter] after typing in that command.)

Conversely, if you want to switch back to a case-sensitive search type this:

:set noignorecase

Off the top of my head I don't know if all vi commands can be negated like that, but it works with all the ones I