bottom icon indicating copy to clipboard operation
bottom copied to clipboard

Readline shortcuts support in search input

Open jul1u5 opened this issue 4 years ago • 3 comments

Describe the feature request

It would be nice to have readline keyboard shortcuts (e.g., Ctrl-a to go to the beginning of the line) in the search input.

Additional context/details

I found this library: https://github.com/kkawakam/rustyline.

jul1u5 avatar Feb 15 '21 22:02 jul1u5

Um, not sure if it's what you meant, but I already do support Ctrl-a to go to the beginning on the line and Ctrl-e to skip to the end within the search input.

Are there any specific shortcuts you want support for? I don't mind adding more support for common ones, but like, I'm not copying things like emacs mode or anything...

ClementTsang avatar Feb 16 '21 01:02 ClementTsang

Oh, yeah, I see Ctrl-a and Ctrl-e work. Sorry, I must have missed that. Other shortcuts I often use are:

  • Ctrl-f move cursor forward one character
  • Ctrl-b move cursor back one character
  • Alt-f move cursor forward one word
  • Alt-b move cursor backward one word
  • Ctrl-d delete a character after the cursor
  • Ctrl-h delete backward one character
  • Alt-d delete a word after the cursor
  • Ctrl-w delete backward one word

jul1u5 avatar Feb 16 '21 09:02 jul1u5

Sounds good. Ctrl-w and Ctrl-h will be covered by https://github.com/ClementTsang/bottom/issues/270, and the other suggested ones seem good to me at a glance.

ClementTsang avatar Feb 16 '21 19:02 ClementTsang