commit cdd88e8dac728e98b3ca6314f34dc41957d762a3 (patch)
parent f2553fa6dad661a49b5699f1b2af462ae23ab623
Author: Alex Karle <alex@karle.co>
Date: Tue, 9 Jul 2019 23:36:52 -0400
[mutt] use `abook` for contact management
The primary functional change in this commit is that it binds <tab> in
the editor to query `abook`, a separate program for contact managent.
Further, it adds a macro "ga" to add the current sender to abook.
Other than that, changes tab/up/down to go by unread instead of new and
changes around whitespace/organizes bindings better.
Diffstat:
M | mutt/muttrc | | | 42 | +++++++++++++++++++++++++++--------------- |
1 file changed, 27 insertions(+), 15 deletions(-)
diff --git a/mutt/muttrc b/mutt/muttrc
@@ -26,6 +26,9 @@ set message_cachedir="~/.config/mutt/cache"
# BCC self to show up in INBOX
my_hdr BCC: $from
+# Use the `abook` program for contact management/completions
+set query_command="abook --mutt-query '%s'"
+
################################################################################
# Bindings
# I've chosen to customize-as-I-go on these. Some general guiding rules:
@@ -35,22 +38,31 @@ my_hdr BCC: $from
# - Especially as a newby, its **the worst** to have CTRL-D
# which I spam in Vim for half-down to delete 5-10 messages
# in the pager before I've realized what I've done.
-bind pager j next-line
-bind pager k previous-line
-bind index G last-entry
-bind pager G bottom
-bind index,pager g noop # good practice, as gg prevents g from binding
-bind index gg first-entry
-bind pager gg top
-bind index,pager h help
-bind index,pager ? search-reverse
-bind index N search-opposite
+
+# Navigation
+bind pager j next-line
+bind pager k previous-line
+bind index G last-entry
+bind pager G bottom
+bind index,pager g noop # good practice, as gg prevents g from binding
+bind index gg first-entry
+bind pager gg top
bind index,pager \CD half-down
bind index,pager \CU half-up
-bind index,pager d half-down
-bind index,pager u half-up
-bind index,pager <up> previous-new-then-unread
-bind index,pager <down> next-new-then-unread
+bind index,pager d half-down
+bind index,pager u half-up
+bind index,pager <up> previous-unread
+bind index,pager <down> next-unread
+bind index,pager <tab> next-unread
+
+# Functional
+bind index,pager h help
+bind index,pager ? search-reverse
+bind index N search-opposite
bind index,pager R group-reply
+bind index \CN toggle-new
+bind attach <return> view-mailcap
+bind editor <Tab> complete-query # Used for contact-completion
-bind attach <return> view-mailcap
+# Macros
+macro index,pager ga "<pipe-message>abook --add-email-quiet<return>" "Add sender to abook contacts"