Vim: case insensitive search

By default, Vim does case sensitive search. How to make case-insensitive search in Vim?

By default, Vim does case sensitive search.

:set ignorecase

can set Vim to conduct case insensitive search. However, it also affects substitutions, which is not we want

However, how to do a case insensitive search only when it is needed?

Use the c escape sequence.

To search ‘theword’ case insensitively:

/thewordc

or

/ctheword

c can appear at any place in the searching word.

Answered by anonymous.

Leave a Reply

Your email address will not be published. Required fields are marked *