Frederick888 / external-editor-revived

External Editor Revived is a Thunderbird MailExtension which allows editing emails in programs such as Vim, Neovim, Emacs, etc.
GNU General Public License v3.0
110 stars 6 forks source link

Shortcuts with tbkeys #141

Open agenbite opened 9 months ago

agenbite commented 9 months ago

I'd love to set my keybindings with the tbkeys extension, which allows to bind keys to run arbitrary code, but I don't know how to call external-editor-revived's commands from code. Has anyone been here before me?

Frederick888 commented 9 months ago

I guess it requires EER to listen on runtime.onMessageExternal, so that you can runtime.sendMessage from tbkeys.

It's a very interesting feature, but also calls for some careful design and plenty of testing. It'll need a bit more traction to motivate me to do this. (Thumbs up on OP if anyone else also wants this.)

By the way, may I know why you wanted to use tbkeys instead of TB's built-in way? Is it that tbkeys allows single-key bindings, or simply the matter of centralised management?

agenbite commented 8 months ago

Thanks for your reply (and for EER)!!

By the way, may I know why you wanted to use tbkeys instead of TB's built-in way? Is it that tbkeys allows single-key bindings, or simply the matter of centralised management?

Yeah, I'd like to hit 'r' over a message and get my favorite editor to open directly with a reply template. For that, I'd need to know the code that EER uses to launch the editor (and that this code works in that context).