On 21Mar2021 12:15, Francesco Ariis <fa...@ariis.it> wrote:
>    how can I automate typing standard replies?
>
>Example: say I want to type «lgtm» (top post) as a reply to a message,
>as now I have to:
>- press `r` (reply)
>- press `i` (my editor is Vim)
>- «lgtm»
>- then <C-[> (exit insert mode)
>- ZZ         (exit/save file)
>- finally `y` to send
>
>Is there a way to one-button this? I thought about a macro,
>but I suspect that wouldn’t work, since I am firing up an
>editor.
>Thanks in advance

If you're automating this, you don't want an editor do you?

Use <pipe-message> to send the raw message to a script of your own. Some 
random macros of my own:

    #macro index,pager ,x "<pipe-message>mailunpack -d ~/"
    macro index,pager V "<pipe-message>mail-open-attachments<enter>" "extract 
attachments to temp dir and open"
    macro index,pager H "<pipe-message>unhdr|a2urls|sort -u|less" "list URLs"

BTW, I've got "set autoedit=yes" and "set edit_headers=yes", drops you 
straight into an editor on reply etc.

Cheers,
Cameron Simpson <c...@cskk.id.au>

Reply via email to