tag:blogger.com,1999:blog-8032022811235182759.post1313233018564659812..comments2024-03-23T08:25:23.254-07:00Comments on Linux Commando: Smart case-insensitive, incremental search using vimPeter Leunghttp://www.blogger.com/profile/05589860210899238688noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-8032022811235182759.post-33564605765373846952015-02-26T01:44:39.106-08:002015-02-26T01:44:39.106-08:00\c and \C was exactly what I was after, thanks Ano...\c and \C was exactly what I was after, thanks Anonymous.E Bothhttps://www.blogger.com/profile/16893048225141840348noreply@blogger.comtag:blogger.com,1999:blog-8032022811235182759.post-71553460363507951012009-11-27T12:21:40.193-08:002009-11-27T12:21:40.193-08:00Error in the above: you can't mix case sensiti...Error in the above: you can't mix case sensitivity in the way described; the first case sensitivity metacharacter in the pattern, \c or \C, decides what sensitivity the entire pattern follows, even the part of the pattern before the \c or \C. So inserting any \c or \C metacharacters later in the pattern doesn't change case sensitivity. You can still choose to be case sensitive on all-lowercase search patterns, though.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8032022811235182759.post-73413908961978912582009-11-27T12:11:18.876-08:002009-11-27T12:11:18.876-08:00You can also insert a \c (case insensitive) or \C ...You can also insert a \c (case insensitive) or \C (case sensitive) metacharacter at the head of your search string. When you use one of these, all text that follows them, until the next case sensitivity metacharacter is encountered, is bound by that case sensitivity metacharacter.<br /><br />For example, the following:<br /><br />:/\capple\C Apple/<br /><br />will find "apple Apple", "Apple Apple", "ApPlE Apple", but not "apple apple" or "apple ApPlE".<br /><br />Using \c and \C means you can mix types of sensitivity in one search, whereas smartcase does not. Also, smartcase may be problematic when you really do want your search all lowercase, and not erroneously match similar uppercase strings.<br /><br />If you can think in regex no problem (as I can), this may be a better option for you. If you prefer a more intuitive, do-what-I-mean interface, using smartcase etc. is probably better for you.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8032022811235182759.post-5546089421252033002009-10-24T05:36:19.007-07:002009-10-24T05:36:19.007-07:00nice indeednice indeedAnonymoushttps://www.blogger.com/profile/05081128407296032740noreply@blogger.comtag:blogger.com,1999:blog-8032022811235182759.post-8776831090506966192009-07-23T23:49:21.425-07:002009-07-23T23:49:21.425-07:00Very cool stuff,
I have added them all to my .vimr...Very cool stuff,<br />I have added them all to my .vimrc.<br /><br />ThanksAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-8032022811235182759.post-52951831551268653732009-06-15T22:36:09.037-07:002009-06-15T22:36:09.037-07:00Thanks, useful tip
I suggest add them to vim tip w...Thanks, useful tip<br />I suggest add them to vim tip wiki.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8032022811235182759.post-60097505182387100322009-01-30T01:23:00.000-08:002009-01-30T01:23:00.000-08:00Very useful, now i put it as my default settings f...Very useful, now i put it as my default settings for vi!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8032022811235182759.post-17795404866452487412008-08-08T14:31:00.000-07:002008-08-08T14:31:00.000-07:00Thanks! Very useful settings. -noobThanks! Very useful settings. -noobAnonymousnoreply@blogger.com