Monday, January 29, 2018

Re: ksh key bindings in vi-mode (arrow keys)

I'll answer my own question...

It looks as if the "bind" builtin lives, along with the bindable
functions, in emacs.c and that the command line editing in Vi-mode never
ever calls these.

I'll conclude (for the time being, until someone says otherwise) that
the "bind" builtin therefore is a no-op in Vi-mode.


Cheers,

On Mon, Jan 29, 2018 at 03:05:38PM +0100, Andreas Kusalananda Kähäri wrote:
> Hi,
>
> I'm wondering whether "bind" works at all in ksh, in Vi-mode.
>
> I'm currently using the default (unchanged) key bindings and my
> up-arrow key sends "^[[A". The bind command tells me this is bound to
> "up-history", but it places me at the end of the command line in insert
> mode (just as would be expected after pressing "Esc" and "A").
>
> bind seems to work as expected in Emacs mode.
>
> The reason I'm asking is that I'm trying to get the arrow keys to work
> intuitively in Vi editing mode as a complement to "hjkl" (I'm on a
> Dvorak keyboard).
>
>
> I'm running an up-to-date -current installation on amd64.
>
>
> Cheers,
> Andreas
>
> --
> Andreas Kusalananda Kähäri,
> National Bioinformatics Infrastructure Sweden (NBIS),
> Uppsala University, Sweden.
>

--
Andreas Kusalananda Kähäri,
National Bioinformatics Infrastructure Sweden (NBIS),
Uppsala University, Sweden.

No comments:

Post a Comment