Re: Bash readline remap ESC insert/command mode key

2012-01-25 Thread Roger
>In Vim, I have set the timeout to 200 milliseconds rather than the >default 1000 (one whole second). > >This amounts to a typing speed of c. 5 characters per second or 60 wpm, >a reasonable goal for the average typist. ditto. about half the default is much better. -- Roger http://rogerx.freesh

Re: Bash readline remap ESC insert/command mode key

2012-01-25 Thread Chris Jones
On Mon, Jan 23, 2012 at 07:38:52PM EST, Chet Ramey wrote: > On 1/23/12 8:52 AM, Roger wrote: > > > A little more indepth examination, and I can see VIM's wait is > > approximately double of what the readline patch's wait time is. > > However, I think the shorter wait time is more functional as whe

Re: Bash readline remap ESC insert/command mode key

2012-01-25 Thread Chet Ramey
On 1/23/12 8:22 PM, Roger wrote: >> Patch seems to work great and I can now type 'exit' without command mode >> being spawned when typing the 'i'. >> >> It's behaviour is almost identical to VIM's. > > Found a bug. That's not really related to the timing issue, since the `i' is dropped completel

Re: Bash readline remap ESC insert/command mode key

2012-01-23 Thread Roger
> On Mon, Jan 23, 2012 at 04:52:17AM -0900, Roger wrote: >> On Sun, Jan 22, 2012 at 04:52:06PM -0500, Chet Ramey wrote: >>On 1/22/12 7:35 AM, Roger wrote: On Sat, Jan 21, 2012 at 09:17:32PM -0500, Chet Ramey wrote: I could look at putting in some sort of inter-character timeout, but

Re: Bash readline remap ESC insert/command mode key

2012-01-23 Thread Chet Ramey
On 1/23/12 8:52 AM, Roger wrote: > A little more indepth examination, and I can see VIM's wait is approximately > double of what the readline patch's wait time is. However, I think the > shorter > wait time is more functional as when typing a double char, it in no way takes > as long as VIM's

Re: Bash readline remap ESC insert/command mode key

2012-01-23 Thread Chris Jones
On Mon, Jan 23, 2012 at 08:52:17AM EST, Roger wrote: [..] > Matter of fact, I'm starting to find VIM's long wait time length > a little annoying. ;-) :h tm :h ttm CJ

Re: Bash readline remap ESC insert/command mode key

2012-01-23 Thread Roger
> On Sun, Jan 22, 2012 at 04:52:06PM -0500, Chet Ramey wrote: >On 1/22/12 7:35 AM, Roger wrote: >>> On Sat, Jan 21, 2012 at 09:17:32PM -0500, Chet Ramey wrote: >>> >>> I could look at putting in some sort of inter-character timeout, but I >>> don't know yet how well the code structure lends itself

Re: Bash readline remap ESC insert/command mode key

2012-01-22 Thread Chet Ramey
On 1/22/12 7:35 AM, Roger wrote: >> On Sat, Jan 21, 2012 at 09:17:32PM -0500, Chet Ramey wrote: >> >> I could look at putting in some sort of inter-character timeout, but I >> don't know yet how well the code structure lends itself to that. Pretty easily, as it turns out. The attached patch adds

Re: Bash readline remap ESC insert/command mode key

2012-01-22 Thread Roger
> On Sat, Jan 21, 2012 at 09:17:32PM -0500, Chet Ramey wrote: > >I could look at putting in some sort of inter-character timeout, but I >don't know yet how well the code structure lends itself to that. Ditto. VIM times-out after a (less then) 1 second pause after nothing else is typed. Readline

Re: Bash readline remap ESC insert/command mode key

2012-01-21 Thread Chet Ramey
On 1/19/12 2:25 AM, Roger wrote: >> bind -m vi-command '"ii": vi-insertion-mode' >> bind -m vi-insert '"ii": vi-movement-mode' >> >> >> Or the following should work (untested here) using $HOME/.inputrc: >> >> $if mode=vi >> >>set keymap vi-command >>"ii": vi-insertion-mode >> >>set keym

Re: Bash readline remap ESC insert/command mode key

2012-01-18 Thread Roger
>bind -m vi-command '"ii": vi-insertion-mode' >bind -m vi-insert '"ii": vi-movement-mode' > > >Or the following should work (untested here) using $HOME/.inputrc: > >$if mode=vi > >set keymap vi-command >"ii": vi-insertion-mode > >set keymap vi-insert >"ii": vi-movement-mode > >$endi

Re: Bash readline remap ESC insert/command mode key

2012-01-18 Thread Roger
> On Wed, Jan 18, 2012 at 09:58:18PM -0900, Roger wrote: >I use vi mode for Bash's realine and want to remap the ESC key to double 'ii' >and ';;' instead of having to remove my hands from the keyboard to tap the ESC >key. > >From what I see, I would be using something similar to: > >$ bind -m vi-