How to do a case insensitive search in vim
/\cYourSearchKeywords case insensitive
/\CYourSearchKeywords case sensitive, which is the default behaviour
A few other ideas:
-
\ccan appear anywhere in the pattern, so if you type a pattern and then decide you wanted a case-insensitive search, just add a\cat the end. -
add
set ignorecasefor case-insensitive searching in my vimrc, and I can use\Cto do a case-sensitive search -
There's also
set smartcasewhich will automatically switch to a case-sensitive search if you use any capital letters- Remember!
set smartcaseapplies only whenset ignorecaseis already active
- Remember!