reedline icon indicating copy to clipboard operation
reedline copied to clipboard

vi mode cursor position isn't vi-like

Open crides opened this issue 1 year ago • 3 comments

2 main issues I can observe:

  1. Escape doesn't move the cursor back.

    For example, interleaving i and escape moves the cursor back one by one (in both vim and zsh vi mode)

  2. 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 this

    For example, having asdf and the cursor at the front (position 0), and pressing any one of w, W, E, e, $ in normal mode, or just pressing right arrows should put the cursor on top of f.

crides avatar Jan 02 '24 07:01 crides

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.

jaredmontoya avatar Mar 21 '25 00:03 jaredmontoya

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.

fdncred avatar Mar 26 '25 00:03 fdncred

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.

tanloong avatar Jun 15 '25 05:06 tanloong