vile
[Top][All Lists]
Advanced

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

Re: iclower


From: Brendan O'Dea
Subject: Re: iclower
Date: Thu, 19 Dec 2019 19:48:35 +1100

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.

--bod

Attachment: vile.patch
Description: Text Data


reply via email to

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