[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-readline] make ';' after 't' work in vi-mode
From: |
Richard Todd |
Subject: |
Re: [Bug-readline] make ';' after 't' work in vi-mode |
Date: |
Thu, 27 Sep 2018 16:15:26 +0000 |
On Thu, Sep 27, 2018 at 11:08:19AM -0400, Chet Ramey wrote:
> On 9/26/18 4:36 PM, Richard Todd wrote:
> > I noticed in vi-mode, if you search with 't'/'T', then readline
> > gets stuck on ';' (because the next letter already matches). So,
> > from the start of this paragraph, I would expect 'te;' to take me
> > to the 'd' in the word "vi-mode", rut readline gets stuck on the
> > 'c' in "noticed" instead.
>
> Thanks for the report. It seems to me that readline implements what the
> POSIX standard wants for t/T, but I'll take a closer look.
Now that you've said that, I realize that the behavior I am after is actually a
vim enhancement. When I turn on vi-compatibility mode, the cursor gets stuck
when trying to repeat a t/T search just as it does in readline. I should have
checked that before I posted the report--I guess I've been running vim too many
years!
I don't know if you are willing to move beyond POSIX, but this changes a no-op
command into something more intuitive (te;; == 3te, rather than te;; == te).
Don't GNU programs generally extend POSIX where there is utility in it? If
not, I understand and thank you for your consideration.