Ignore case in vim searches
Ahhh, there it is! I've often wanted to know how to make "/" searches in vim case insensitive, and today somebody at work enlightened me. If \c appears anywhere in a pattern the whole pattern is assumed to be case insensitive. So to search for the string "root" while ignoring case you'd use
/\crootTake a look at
:help ignorecase in vim for more info.


4 comments:
Finally, thanks for the info.
Neat, didn't know that one!
If you want all your searches to be case insensitive, type:
:set ic
I use the ignorecase and smartcase settings as default, and they work great for me. Any search with an uppercase character becomes a case sensitive search.
\c is good to know when your working on other people's stations.
:set ic
:set scs
thanks mate
Post a Comment