[Top][All Lists]

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

Re: [Bug-readline] c + movement in vi mode

From: Chet Ramey
Subject: Re: [Bug-readline] c + movement in vi mode
Date: Thu, 05 Aug 2010 17:12:16 -0400
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv: Gecko/20100111 Lightning/1.0b1 Thunderbird/3.0.1

On 8/4/10 11:39 AM, Aryeh Leib Taurog wrote:
> Hi,
> I don't know if this is a bug or not, but I am not sure where else to
> ask.  I am very grateful to have gnureadline, maybe I just some guidance
> configuring it.
> When using bash in vi mode, I can combine the 'c' command with a
> multi-keystroke motion just like I do in vi.  i.e. I type
> psql -t -A -f myscript.sql<ESC>0ctm
> I am now changing the command line up to the filename myscript.sql
> When I try this elsewhere, it doesn't work.  For example in python when
> I type "datetime.now()<ESC>02ftct(" I expect to change the text
> "time.now" but it simply positions the cursor on the "w" as if I had not
> typed "c"  Is there some way to get the expected behavior outside of
> bash?  Note that the "c" command does work with single-keystroke
> motions, for instance "ce" or even with number modifier, "c2e"

This has to do with state-driven editing in readline's callback mode.  I
have fixed the problem with vi-mode motion commands for the next readline

``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/

reply via email to

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