nushell / reedline

A feature-rich line editor - powering Nushell
https://docs.rs/reedline/
MIT License
547 stars 152 forks source link

Request for additional keybindings #619

Open sophiajt opened 1 year ago

sophiajt commented 1 year ago

From Nushell's repo: https://github.com/nushell/nushell/issues/510

I tried nu a few versions ago and it was really nice. I just gave it a go again and I must say it improved a lot, but this issue is IMHO still the biggest blocker to switch from other shells.

The cmd Ctrl + Z to undo works fine. I like that it undoes an entire word and not just a single letter like powershell.

I use the following combinations a lot and they are (unless it can be configured/enabled and I missed that) currently missing:

Combination Explanation
Ctrl + LeftArrow
Ctrl + RightArrow
Works partially, IMHO some special characters like punctuation should also work as stop points (try in powershell with "some.very.long.string.with.dots"). Maybe make those characters configurable?
Ctrl + Z
Ctrl + Y
Works partially, Undo with Ctrl + Z works but there is no redo
Shift
+ all Ctrl movements from above (including Shift + Home and Shift + End)
Select text
Ctrl + A Select all
Ctrl + C
Ctrl + V
Ctrl + X
Works partially when the terminal supports it (with mouse select) but Ctrl + X + keyboard selection doesn't work
ESC (like in Powershell)
or Ctrl + U (like in bash)
Clear the current line

Let us know about features you really want to see in reedline.

References

If the feature you are interested in exists in other shells or terminal editors, please share links to documentation or screenshots to easily communicate the desired behavior!

fdncred commented 1 year ago

I use this for clear

  {
    name: clear
    modifier: none
    keycode: esc
    mode: emacs
    event: { edit: clear }
  }