On Thu, Dec 19, 2019 at 07:48:35PM +1100, Brendan O'Dea wrote: > On Wed, Dec 18, 2019 at 05:55:25PM -0500, Thomas Dickey wrote: > >On Wed, Dec 18, 2019 at 11:00:44AM -0800, Marc Simpson wrote: > >> One nice nvi feature that I miss in vile is the `iclower' setting: > >> > >> iclower [off] > >> The iclower edit option makes all Regular Expressions > >> case-insensitive, as long as an uppercase letter does not > >> appear in the search string. > [...] > >> Out of curiosity: Would anyone else find this functionality useful > >> in vile? > > > >maybe - it doesn't seem like a large change, since the existing > >comparison is done in one place in regexp.c: > > > >#define SAME(a,b) (ignorecase ? nocase_eq(a,b) : (CharOf(a) == CharOf(b))) > > I looked at this today and it is certainly doable, but ends up being a bit > more invasive than expected due to the requirement to toggle the behaviour > based on the search string, which is somewhat further up the stack than where > the match is performed. > > A patch to 9.8t is attached which implements "smartmatch", which is a similar > feature that vim supports. Very lightly tested.
builds ok (I'm slow on 9.8u since I have two problems with Windows 10) -- Thomas E. Dickey <[email protected]> https://invisible-island.net ftp://ftp.invisible-island.net
signature.asc
Description: PGP signature
