vile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iclower


From: Thomas Dickey
Subject: Re: iclower
Date: Thu, 19 Dec 2019 05:19:40 -0500
User-agent: NeoMutt/20170113 (1.7.2)

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 <address@hidden>
https://invisible-island.net
ftp://ftp.invisible-island.net

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]