Hello Oliver,

Thanks for the reply. Just to make sure if we understand each other.

in vim
1. press I for insert mode
2. type "asdf"
3. ESC for normal mode
4. press "shift-a" for append
5. press "ctrl-u" <- clears the line till the beginning

in zsh with vi-mode
1. (its in insert mode by default)
2. type "asdf"
3. ESC for normal mode
4. press "shift-a" for append
5. press "ctrl-u" <- nothing happens.

I thought its a bug. But if it is intended behavior, let it be this way.

On Sat, Nov 6, 2021 at 4:04 PM Oliver Kiddle <opk@zsh.org> wrote:
Taras Halturin wrote:
> It seems I found a bug in zsh with vim-mode enabled. Ctrl-U (clear line to the
> beginning) doesn't work correctly after switching between "normal" and "insert"
> modes.

That's not what Ctrl-U does in vi or vim. It deletes from the cursor
back to the point where insert mode was started.

In the zsh documentation for vi-kill-line, exactly that behaviour is
described and that is what you get.

If that's not what you want, you can bind Ctrl-U to kill-whole-line or
kill-buffer or to whatever precise behaviour you want.

Oliver


--
Best Regards.
Taras Halturin