[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: iclower
From: |
Marc Simpson |
Subject: |
Re: iclower |
Date: |
Thu, 19 Dec 2019 07:46:13 -0800 |
On Thu, Dec 19, 2019 at 2:19 AM Thomas Dickey <address@hidden> wrote:
>
> 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)
Thanks Brendan and Tom!
Did some very preliminary testing of v9_8t15; smartcase looks great so far.
Best,
Marc