diff options
author | Guangxiong Lin <[email protected]> | 2022-05-14 19:19:16 +0800 |
---|---|---|
committer | Guangxiong Lin <[email protected]> | 2022-05-14 19:19:16 +0800 |
commit | 35f036b08badc0624c9dbb4eccbc184bc9b06362 (patch) | |
tree | f5bec5547aed6441fe0d6f7230dae45886e3bf81 /.mutt | |
parent | c2f45885ab28d29e6d5f0ba80c86aacd2a759900 (diff) | |
download | dotfiles-35f036b08badc0624c9dbb4eccbc184bc9b06362.tar.gz dotfiles-35f036b08badc0624c9dbb4eccbc184bc9b06362.tar.bz2 dotfiles-35f036b08badc0624c9dbb4eccbc184bc9b06362.zip |
Update mutt keybindings
Diffstat (limited to '.mutt')
-rw-r--r-- | .mutt/keybindings | 13 | ||||
-rw-r--r-- | .mutt/muttrc | 6 |
2 files changed, 9 insertions, 10 deletions
diff --git a/.mutt/keybindings b/.mutt/keybindings index f648e70..6c51e36 100644 --- a/.mutt/keybindings +++ b/.mutt/keybindings @@ -13,7 +13,12 @@ bind attach,index G last-entry bind index,pager \Cn sidebar-next bind index,pager \Cp sidebar-prev -# '^L' performs a notmuch query, showing only the results -macro index \Cl "<enter-command>unset wait_key<enter><shell-escape>read -p 'notmuch query: ' x; echo \$x >~/.cache/mutt_terms<enter><limit>~i \"\`notmuch search --output=messages \$(cat ~/.cache/mutt_terms) | head -n 600 | perl -le '@a=<>;chomp@a;s/\^id:// for@a;s/\\+/\\\\+/g for@a;s/=/\\\\=/g for@a;$,=\"|\";print@a'\`\"<enter>" "show only messages matching a notmuch pattern" -# 'a' shows all messages again (supersedes default <alias> binding) -macro index a "<limit>all\n" "show all messages (undo limit)" +# ',l' performs a notmuch query, showing only the results +macro index ',l' "<enter-command>unset wait_key<enter><shell-escape>read -p 'notmuch query: ' x; echo \$x >~/.cache/mutt_terms<enter><limit>~i \"\`notmuch search --output=messages \$(cat ~/.cache/mutt_terms) | head -n 600 | perl -le '@a=<>;chomp@a;s/\^id:// for@a;s/\\+/\\\\+/g for@a;s/=/\\\\=/g for@a;$,=\"|\";print@a'\`\"<enter>" "show only messages matching a notmuch pattern" + +macro index 'c' '<change-folder>?<change-dir><home>^K=<enter>' +macro index,pager 's' '<save-message>?' + +macro attach 'V' "<pipe-entry>iconv -c --to-code=UTF8 > ~/.cache/mutt/mail.html<enter><shell-escape>$BROWSER ~/.cache/mutt/mail.html<enter>" +macro attach s <save-entry><kill-line>~/Downloads/ + diff --git a/.mutt/muttrc b/.mutt/muttrc index 47c4ccb..43f8303 100644 --- a/.mutt/muttrc +++ b/.mutt/muttrc @@ -24,12 +24,6 @@ set use_from=yes auto_view text/html alternative_order text/plain text/html -macro index 'c' '<change-folder>?<change-dir><home>^K=<enter>' -macro index,pager 's' '<save-message>?' - -macro attach 'V' "<pipe-entry>iconv -c --to-code=UTF8 > ~/.cache/mutt/mail.html<enter><shell-escape>$BROWSER ~/.cache/mutt/mail.html<enter>" -macro attach s <save-entry><kill-line>~/Downloads/ - # key bindings source ~/.mutt/keybindings |