mirror of
https://github.com/d99kris/nmail.git
synced 2026-04-27 02:06:00 +03:00
[GH-ISSUE #62] [Enhancement] Support (more) readline hotkeys when composing emails #56
Labels
No labels
bug
enhancement
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nmail#56
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sc0ttj on GitHub (Nov 22, 2020).
Original GitHub issue: https://github.com/d99kris/nmail/issues/62
Originally assigned to: @d99kris on GitHub.
In my terminal, I am able to do stuff like like
Alt-f(skip forward a word),Alt-b(skip back a word), which are thereadline"emacs style" defaults.I notice that some of these readline hot keys do work with nmail, such as Ctrl-K (delete whole line).
I also have
Alt-left,Alt-rightset to skip whole words in my~/.inputrc(in addition to the default hot keys, some of which I listed above)However: When I use
Alt,CtrlorShiftwith cursor/arrow keys, or evenAlt-fandAlt-b, thennmailprints stuff like this:It would be nice if nmail respected the readline settings, or at least provided some of its own, similar hot keys.
Specifically, it would be nice to skip whole words (back & forward) and delete whole words (back and forward, with Alt-delete and Alt-backspace).
@d99kris commented on GitHub (Nov 23, 2020):
Hi @sc0ttj - thanks for reporting this.
Yeah, the built-in compose editor in
nmailis all but fantastic. Early on I added a functionality to compose in external$EDITORby pressingCTRL-efor this reason.I can agree it makes sense to support some more basic key shortcuts. Let me take a look at this and see what can be supported with reasonable effort.
@sc0ttj commented on GitHub (Nov 23, 2020):
Thanks 👍
A quick win might be to add just
Alt-left,
Alt-right,
Alt-backspace,
Alt-delete
...as I doubt any users of any language are expecting to see stuff like
ȫȈȜȫȱȜȫȜȱȫȜȫȈȜȩȆȚȩȯȚȩȯȚwhen using those combinations.. Then you could ignore readline entirely.. Just a thought, obvs..@d99kris commented on GitHub (Nov 28, 2020):
I've implemented support for the keyboard shortcuts suggested in the last comment. I've only tested in Ubuntu
gnome-terminaland macOSTerminal.app, where the default keyboard config should work correctly. Other environments may need manual configuration inui.conf. See theREADME.mdfor details.Please let me know if you encounter any issues. Thanks!