Case Insensitive Search in Vim

By default, the search in Vim editor is case sensitive. But you can also perform case insensitive searches.

Suppose you are searching for the pattern Vim or vim or vIm.

Go to the ESCAPE mode (by pressing ESC key)

Enter :set ic (Note that the semicolon in the beginning is must), ic corresponds to ignore case.

Now enter your search term, /Vim (to search forward) or ?Vim (to search backward).

It will search for all patterns like vim, vIm, vIM, VIM, Vim, VIm,…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s