Bash – How to quickly move the cursor to the end in bash in vi mode

bashvi

When I'm in insert mode and I move left from the last cursor position (the empty spot to the right of the last character), then I can't go back to that position anymore. I have to type Esc$a (or replace $ with a bunch of times) to get there. It seems like a lot of extra keystrokes just to, say, go delete the last character (and still be in insert mode).

Is there a better way or should I just use the default emacs mode (even though I don't know a single emacs command)?

Best Answer

In normal mode you start edit at end of line with Shift+A.

In insert mode you should be able to move to EOL.

In manual:

man readline
/VI Mode bindings<Enter>

As to real/other question, I have to fill in a bit:

$ le eds de x
      ^     ^^
      |     ||
      A     BC

In insert mode do you mean you are not able to move to C, only B from A?

Even with , or End?

So that if you start typing the letters will enter before x?

Related Question