Re: Why regexp works different in stock vi vs. vim
On Fri, Feb 5, 2016 at 6:13 PM, Артур Истомин wrote: > When I search tabs in stock vi with '/\t'. It finds all words 'tried'. In > vim it finds tabs. Why? Because \t is a literal t in a standard regular expression. vim uses a different regular expression library that interprets it as a tab. If you want to search for a tab, you can just use a literal tab in the search string. In the past, I've needed to prefix it with ^v, but that doesn't seem to be necessary on any of the systems I have in front of me right now. Tet -- I saw cout being shifted "Hello world" times to the left and stopped right there. — Steve Gonedes
Why regexp works different in stock vi vs. vim
I have file where first symbols are tabs: Sally tried really really hard Timmy tried really really really hard Johnny tried really really really really hard When I search tabs in stock vi with '/\t'. It finds all words 'tried'. In vim it finds tabs. Why? In fact, I can't find tabs in stock vi anyhow.My system is OpenBSD 5.8 Thanks.
Re: Why regexp works different in stock vi vs. vim
http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man1/ex.1?query=vi â¨*literal next*â©Escape the next character from any special meaning. The â¨literal nextâ© character is usually â¨control-Vâ©. This does the trick for me: /^V On Fri, Feb 5, 2016 at 12:13 PM, ÐÑÑÑÑ ÐÑÑомин wrote: > I have file where first symbols are tabs: > > Sally tried really really hard > Timmy tried really really really hard > Johnny tried really really really really hard > > When I search tabs in stock vi with '/\t'. It finds all words 'tried'. In > vim it finds tabs. Why? In fact, I can't find tabs in stock vi anyhow.My > system is OpenBSD 5.8 > > Thanks.