Case Sensitive Search in Vi/Vim

By default, the search in Vim editor is case sensitive. But in cases, where the search is turned to case insensitive using the vim settings file: .vimrc, it can be overridden by the following way

Suppose you are searching for the pattern Vim

Go to the ESCAPE mode (by pressing ESC key)

Enter :set noic (Note that the semicolon in the beginning is must), where noic corresponds to No Ignore Case (Don’t ignore Case)

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


Leave a Reply

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

You are commenting using your 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