aboutsummaryrefslogtreecommitdiffstats
path: root/doc/aerc-config.5.scd
diff options
context:
space:
mode:
authorJonathan Bartlett <jonathan@jonnobrow.co.uk>2021-12-10 21:27:29 +0000
committerRobin Jarry <robin@jarry.cc>2021-12-11 21:45:41 +0100
commit175d0efeb22eb61ce40a1b25969886a66fcdf83e (patch)
tree8aaab1ec68acbccf5183419832d69c436f66a5d9 /doc/aerc-config.5.scd
parentb84374a572b4f23611fb85415142d385e4a4228c (diff)
downloadaerc-175d0efeb22eb61ce40a1b25969886a66fcdf83e.tar.gz
binds: add account specific bindings
When using aerc for multiple accounts often bindings might differ slightly between accounts. For example: * Account A archives to one directory (:archive) * Account B archives to monthly directories (:archive month) Add account specific bindings to allow the user to add a "context" to a binding group using a context specifier and a regular expression. Currently the only context specifier is 'account'. The regular expression is validated against the accounts loaded from accounts.conf and the configuration fails to load if there are no matches. Contextual bindings are merged with global bindings, with contextual bindings taking precedence, when that context is active. Bindings are be configured using a generic pattern of 'view:context=regexp'. E.g.: # Globally Applicable Archiving [messages] A = :read<Enter>:archive<Enter> # Monthly Archiving for 'Mailbox' Account [messages:account=Mailbox$] A = :read<Enter>:archive month<Enter> In the above example all accounts matching the regular expression will archive in the monthly format - all others will use the global binding. Signed-off-by: Jonathan Bartlett <jonathan@jonnobrow.co.uk>
Diffstat (limited to 'doc/aerc-config.5.scd')
-rw-r--r--doc/aerc-config.5.scd15
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/aerc-config.5.scd b/doc/aerc-config.5.scd
index e95a86ce..ae030747 100644
--- a/doc/aerc-config.5.scd
+++ b/doc/aerc-config.5.scd
@@ -528,6 +528,21 @@ are:
*[terminal]*
keybindings for terminal tabs
+You may also configure account specific key bindings for each context:
+
+*[context:account=<AccountName>]*
+ keybindings for this context and account, where <AccountName> matches
+ the account name you provided in *accounts.conf*.
+
+Example:
+```
+[messages:account=Mailbox]
+c = :cf path:mailbox/** and<space>
+
+[compose::editor:account=Mailbox2]
+...
+```
+
You may also configure global keybindings by placing them at the beginning of
the file, before specifying any context-specific sections. For each *key=value*
option specified, the _key_ is the keystrokes pressed (in order) to invoke this