AERC-BINDS(5)

πŸŽ€ AERC-BINDS πŸ’…

okay bestie, so this is the file format for key bindings configuration in aerc(1) β€” the manual page is aerc-binds(5) and it's literally the cheat sheet for making your mail client feel like your mail client. πŸ¦‹


✨ SYNOPSIS ✨

The binds.conf file is where you set up the keybindings for the aerc interactive client. It's expected to live in your XDG config home plus aerc, which defaults to ~/.config/aerc/binds.conf. If that file isn't there? No worries β€” the built-in default gets installed for you. πŸ’– You can also point at a totally different file with the --binds-conf command line argument, see aerc(1).

This file is written in the ini format, and key bindings look like this:

<key sequence> = <command>

Where <key sequence> is the keystrokes you press (in order) to invoke the keybinding, and <command> is the keystrokes that aerc will simulate when you invoke it. Generally you use this to run commands, like:

rq = :reply -q<Enter>

So pressing r, then q, simulates typing in :reply -q<Enter> β€” and then :reply -q executes accordingly. Slay. ✨ And yes, you can also invoke keybindings recursively the same way. icon behavior.

You can set up different keybindings for different contexts by dropping them into different [sections] of the ini file. πŸ’…


🌸 CONTEXTS 🌸

The contexts you've got available:

  • [default] β€” global keybindings that apply to all contexts (unless overridden). Alternatively, global bindings can go at the beginning of the file, before any section header.
  • [messages] β€” keybindings for the message list
  • [view] β€” keybindings for the message viewer
  • [view::passthrough] β€” keybindings for the viewer, when in key passthrough mode (toggled with :toggle-key-passthrough)
  • [compose] β€” keybindings for the message composer
  • [compose::editor] β€” keybindings for the composer, when the editor is focused
  • [compose::review] β€” keybindings for the composer, when reviewing the email before it's sent
    • To customize the description shown on the review screen, add a comment (" # ") at the end of the keybinding. Example:
p = :postpone<Enter> # I'll work on it later
  • The order in which bindings are defined is preserved on the review screen. If a non-default binding is not annotated, it'll be displayed without any description.
  • To hide a binding from the review screen, explicitly annotate it with a " # -" comment. Example:
<C-e> = :encrypt<Enter> # -
  • [terminal] β€” keybindings for terminal tabs

You can also configure account specific key bindings for each context:

  • [context:account=AccountName] β€” keybindings for this context and account, where AccountName is a regular expression that matches the account name you provided in accounts.conf.

Folder and context-specific bindings can be configured for message lists too:

  • [messages:folder=FolderName]
  • [view:folder=FolderName]
  • [view::passthrough:folder=FolderName]
  • [compose:folder=FolderName]
  • [compose::editor:folder=FolderName]
  • [compose::review:folder=FolderName]

keybindings under this section will be specific to the folder that matches the regular expression FolderName. Heads up: keybindings from a folder specifier will take precedence over account specifiers. πŸ‘‘


πŸ”₯ EXAMPLES πŸ”₯

[messages:account=Mailbox]
c = :cf path:mailbox/** and<space>

[compose::editor:account=Mailbox2]

[compose::editor:folder=aerc]
y = :send -t aerc

[messages:folder=Drafts]
<Enter> = :recall<Enter>

[messages:folder=Archive/d+/.*]
gi = :cf Inbox<Enter>
...

You can also configure global keybindings by placing them at the beginning of the file, before specifying any context-specific sections. 🫢

Parent keybindings can be erased in the context ones by specifying an "empty" binding:

[compose::review]
a = :attach<space>
d = :detach<space>

[compose::review:account=no-attachments]
a =
d =

If you want to change the default Delete action to move to Trash instead of deleting permanently:

d = :read<Enter>:move Trash<Enter>
#...
[messages:folder=Trash]
d = :choose -o y 'Permanently delete?' delete-message<Enter>
# And similarly for Spam

πŸ’œ SPECIAL OPTIONS πŸ’œ

In addition to user defined key sequences, the following special options are available in each binding context:

  • $noinherit = true|false β€” if set to true, global keybindings will not be effective in this context.
    • Default: false
  • $ex = <key-stroke> β€” this can be set to a keystroke which will bring up the command input in this context.
    • Default: :
  • $complete = <key-stroke> β€” this can be set to a keystroke which will trigger command completion in this context for text inputs that support it.
    • Default: <tab>
    • Note: automatic command completion is disabled when simulating keystrokes and re-enabled at the end. When [ui].completion-min-chars is set to manual (see aerc-config(5)), it is possible to end a keybinding with the completion key to explicitly display the completion menu. E.g.:
o = :cf<space><tab>

⭐ SUPPORTED KEYS ⭐

In addition to letters and some characters (e.g. a, RR, gu, ?, !, etc.), special keys may be specified in <angle brackets>. The syntax for modified or special keys is:

<C-A-S-key>

Where C is control, A is alt, S is shift, and key is the named key or character. πŸ’…

Valid key names are:

  • <space> β€” " "
  • <dash> β€” -
  • <semicolon> β€” ;
  • <tab> β€” Tab
  • <enter>, <cr> β€” Enter
  • <up> β€” Up arrow
  • <down> β€” Down arrow
  • <right> β€” Right arrow
  • <left> β€” Left arrow
  • <pgup> β€” Page Up
  • <pgdn> β€” Page Down
  • <home> β€” Home
  • <end> β€” End
  • <insert> β€” Insert
  • <delete>, <del> β€” Delete
  • <backspace> β€” Backspace
  • <exit> β€” Exit
  • <clear> β€” Clear
  • <cancel> β€” Cancel
  • <print> β€” Print screen
  • <pause> β€” Pause
  • <backtab> β€” Shift+Tab
  • <esc> β€” Escape
  • <f1> ... <f63> β€” Function keys

🌈 SEE ALSO 🌈

aerc(1) aerc-config(5)


πŸ‘‘ AUTHORS πŸ‘‘

Originally created by Drew DeVault and maintained by Robin Jarry who is assisted by other open source contributors. For more information about aerc development, see https://sr.ht/~rjarry/aerc/. 🫢


okay that's the whole thing bestie, no cap, every last flag and key name preserved πŸ’– this page was dated 2026-09-07 and it's the AERC-BINDS(5) File Formats Manual β€” go forth and bind responsibly πŸŽ€βœ¨

πŸ“¦ where this page comes from