vi mode cursor position isn't vi-like
2 main issues I can observe:
-
Escape doesn't move the cursor back.
For example, interleaving
iand escape moves the cursor back one by one (in both vim and zsh vi mode) -
Moving to the last character puts the cursor after the last character, not on top of it. Note:
$is not the only way to achieve thisFor example, having
asdfand the cursor at the front (position 0), and pressing any one ofw,W,E,e,$in normal mode, or just pressing right arrows should put the cursor on top off.
This needs to get fixed. I think a lot of people who tried out nushell immediately went back to zsh after they found out how bad VI mode is.
feel free to submit a fix for it. i'd like to see something like https://github.com/ulyssa/modalkit used to overhaul the vi mode.
PR #699 is reverted in https://github.com/nushell/reedline/commit/6957b5ab7b98c3f090131e9388c18c1826812314 as it breaks the history traversal. Trying nushell for the first time and personally feeling very uncomfortable at current escaping behavior and hoping it can be fixed without any breaks.