Vim: case insensitive search

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

asked Jan 21, 2013 by forum (2,150 points)

1 Answer

 
Best answer

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:

/theword\c

or

/\ctheword

\c can appear at any place in the searching word.

answered Jan 21, 2013 by anonymous
selected Jan 22, 2013 by SA

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost

...