[Top][All Lists]

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

Re: [Bug-readline] buggy interaction between bracketed-paste mode and vi

From: Chet Ramey
Subject: Re: [Bug-readline] buggy interaction between bracketed-paste mode and vi mode
Date: Fri, 13 Sep 2019 09:36:09 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

On 9/12/19 6:55 PM, Mike Jonkmans wrote:

> What i think happens is, that the escape, from the bracketed paste, takes you 
> into
> command mode, then the '[' does nothing and the 200~ capitalizes to the end 
> of line.

Indeed, that's more or less what happens.

> So I use a workaround for this:
> set keymap vi-command
> "\e[200~": bracketed-paste-begin
> "[200~": bracketed-paste-begin
> set keymap vi-insert
> "\e[200~": bracketed-paste-begin

That works for the common case of bracketed pastes when you're at the
top level (and the vi-insertion key binding is already the default),
but is incomplete.

It doesn't work for things like vi overwrite mode, or to read movement
keys for vi's delete-to or change-to commands, or the replace command
in your original report from July, so that required a little more work.

That updated code is in the readline devel branch on savannah.

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

reply via email to

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