From 30030782e14b097b1af1723a7ca6e30c681970f6 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 13 Dec 2022 09:53:46 +0100 Subject: [PATCH] office: Add more vim-like mappings to neomutt Added page up/down movement with the C-u/d/b/f key combinations, as well as message and thread removal with dd (message), dT (thread) and dt (sub-thread) chords. Replies have been changed to rr (reply all) or ro (reply one). The 'new' flag can be toggled by s (for seen) as previously, though now other flags can be toggled with S and all messages can be marked as seen with C-s. Other things are mostly the same, though threads can be collapsed with za (one) or zA (all) and moved between with gt/gT. --- office/.config/neomutt/maps | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/office/.config/neomutt/maps b/office/.config/neomutt/maps index 290b75e..d6019e4 100644 --- a/office/.config/neomutt/maps +++ b/office/.config/neomutt/maps @@ -5,11 +5,29 @@ bind index,pager g noop # don't send group-replies with g bind index gg first-entry bind index G last-entry bind index collapse-thread -bind index,pager \CF next-page -bind index,pager \CB previous-page -bind index,pager N search-opposite # vim-like search -bind index s toggle-new -macro index \CS "T~UN." "mark all messages as read" + +# view manipulation +bind attach,browser,index,pager \CF next-page +bind attach,browser,index,pager \CB previous-page +bind attach,browser,index,pager \Cu half-up +bind attach,browser,index,pager \Cd half-down +bind browser,index,pager \Ce next-line +bind browser,index,pager \Cy previous-line + +bind index s toggle-new +bind index S set-flag +macro index \CS "T~UN." "mark all messages as read" +bind index,pager w display-toggle-weed + +# Thread manipulation +bind pager d noop +bind index,pager dd delete-message +bind index,pager dT delete-thread +bind index,pager dt delete-subthread +bind pager,index gt next-thread +bind pager,index gT previous-thread +bind pager,index za collapse-thread +bind pager,index zA collapse-all # Email completion bindings bind editor complete-query @@ -33,7 +51,7 @@ bind index,pager sidebar-prev bind index,pager sidebar-open # search navigation macro index a "all\n" "show all messages (undo limit)" -# notmuch search navigation +bind browser,index,pager N search-opposite # vim-like search bind index \\ vfolder-from-query # notmuch search # pager navigation bind pager,attach h exit @@ -48,7 +66,9 @@ bind compose p postpone-message macro compose M "F pandoc -s -f markdown -t html \ny^T^Utext/html; charset=UTF-8\n" "Convert from MD to HTML" # since we unbound the original g -bind index,pager R group-reply +bind index,pager r noop # to avoid accidentally sending replies +bind index,pager rr group-reply +bind index,pager ro reply # open urls found in the e-mail macro index,pager \CU "|urlview" "call urlview to open links"