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: Wed, 18 Dec 2019 17:55:25 -0500
User-agent: NeoMutt/20170113 (1.7.2)

On Wed, Dec 18, 2019 at 11:00:44AM -0800, Marc Simpson wrote:
> Hi all,
> 
> [I forget whether this has been discussed before; a preliminary
>  search on https://lists.nongnu.org/archive/html/vile/ suggests not:]

I don't recall that, though it reminds me of a couple of things on my to-do
list...
 
> 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.
> 
> where /abc/ matches {'abc', 'Abc', 'ABC', ...} but /Abc/ only matches
> 'Abc'.  This is convenient if your typical preference is for case
> insensitive matching but you occasionally need to search for
> uppercased constants, class names or other identifiers where case
> is used contrastively.  `ignorecase' typically frustrates this use
> case (at least for short inputs), so toggling case sensitivity
> (`set noic') is typically required to avoid being flooded with false
> positives.
> 
> 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)))

-- 
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]