Re: bind -m vi-insert '"jj": "\e"' problem in 4.4

2016-11-10 Thread Clark Wang
On Fri, Nov 4, 2016 at 6:36 PM, Clark Wang  wrote:

> For example, in vi-insert mode I input following in the command line:
>
> # foo abc
>
> The cursor is right after 'c'. Now if I press ESC then it'll go to
> vi-command mode and the cursor will move to under 'c'. But if I press jj
> the cursor would be still after 'c' and if then I press h the cursor will
> skip 'c' and move to under 'b' . In 4.3, ESC and jj works the same so there
> must be something changed in 4.4. Please take a look.
>

The following workaround works fine for me:

  bind -m vi-insert '"jj": "\e\e"'# double ESC :)

-clark


Re: bind -m vi-insert '"jj": "\e"' problem in 4.4

2016-11-10 Thread Chet Ramey
On 11/10/16 4:46 AM, Clark Wang wrote:
> On Fri, Nov 4, 2016 at 6:36 PM, Clark Wang  > wrote:
> 
> For example, in vi-insert mode I input following in the command line:
> 
> # foo abc
> 
> The cursor is right after 'c'. Now if I press ESC then it'll go to
> vi-command mode and the cursor will move to under 'c'. But if I press
> jj the cursor would be still after 'c' and if then I press h the cursor
> will skip 'c' and move to under 'b' . In 4.3, ESC and jj works the same
> so there must be something changed in 4.4. Please take a look.
> 
> 
> The following workaround works fine for me:
> 
>   bind -m vi-insert '"jj": "\e\e"'# double ESC :)

There is a fix for this in the most recent commit to the devel branch
on savannah.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/