Vi: Searching Case-Insensitive

In vi or vim, search is started in command mode by hitting ESC then /, but it’s case-sensitive by default.

Searching for /year would only come up with the second occurrence of year.

Year one.
Then year two.

Now to make it case-insensitive, prefix your search term with \c like \cyear and it’ll find both instances.

Leave a Reply

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