Case-insensitive searching in vi

   

The searched in vi/vim are case-sensitive by default.  If you need to do a case-insensitive search you must to this action:

  •  go into command mode (press Escape)
  • type :set ignorecase. You can also type :set ic as an abbreviation.

To restore the case-sensitive mode do:

  •  go into command mode (press Escape)
  • type :set noignorecase or :set noic in command mode.

Leave a Reply

Your email address will not be published.