neomutt: New key mapping style

First we unbind all existing key mappings and then we slowly build up
our own again. May be somewhat unnecessary but I have been getting
_very_ confused with neomutt mappings just popping up all over the place
and never quite sure if they were from me or default settings or where
exactly they were configured.
This provides a clean slate to build upon.
This commit is contained in:
Marty Oehme 2025-09-17 16:48:43 +02:00
parent eb7f47fee5
commit 821693dc7c
Signed by: Marty
GPG key ID: 4E535BC19C61886E
4 changed files with 491 additions and 94 deletions

View file

@ -0,0 +1,225 @@
bind generic,index,editor,pager,compose <f1> help
set abort_key = "<Esc>" # overwrite default, frankly insane, <C-g> combination
# NOTE: For operations where message/thread are both possible:
# Generally the lower-case letter will operate on the WHOLE thread
# while the upper-case letter will operate on a specific message in the thread.
# e.g. t -> tag thread / T -> tag message
# dd -> delete thread / dD -> delete message
# go 'back' with h but only close the app with q
bind index,pager,attach,browser,query,alias,compose q exit
bind pager,attach,browser,query,alias,compose h exit
# 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 zz current-middle
bind index zt current-top
bind index zb current-bottom
# line navigation
bind index,attach,browser,query G last-entry
bind index,attach,browser,query gg first-entry
bind pager G bottom
bind pager gg top
bind attach,browser,query,compose j next-entry
bind attach,browser,query,compose k previous-entry
bind index j next-undeleted
bind index k previous-undeleted
bind pager j next-line
bind pager k previous-line
bind index,pager \Cn next-entry
bind index,pager \Cp previous-entry
# tagging
macro index J <tag-thread> "tag current and select next entry"
macro index K ":set resolve=no<enter><tag-thread><previous-undeleted>:set resolve=yes<enter>" "tag current and select previous entry"
macro index t ":set resolve=no<enter><tag-thread>:set resolve=yes<enter>" "tag current thread"
macro index T ":set resolve=no<enter><tag-entry>:set resolve=yes<enter>" "tag current entry"
# flagging
bind index,pager ,F set-flag
bind index,pager ,fc clear-flag
bind index,pager ,\cf clear-flag
bind index,pager ,ff flag-message
bind index ,fs toggle-new # can't toggle new WHILE reading a msg
macro index ,S "T~U<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>" "mark all messages as read"
bind index,pager ,fl edit-label # set X-Label Header
# sorting
bind index <space>s sort-mailbox
bind index <space>S sort-reverse
# threads
bind index l display-message
bind index <return> display-message
bind index h collapse-thread
bind index <space><space> collapse-thread # TODO: Remove in favor of learning za?
bind pager,index + link-threads
bind pager,index - break-thread
bind pager,index gt next-thread
bind pager,index gT previous-thread
bind pager,index za collapse-thread
bind pager,index zA collapse-all
bind pager,index zr reconstruct-thread
bind pager,index zR entire-thread
# message manipulation
bind index,pager dD delete-message
bind index,pager dd delete-thread
bind index,pager dt delete-subthread
bind index,pager u undelete-thread
bind index,pager U undelete-message
# TODO: Figure out
macro index D ";:set resolve=no<enter><clear-flag>!<save-message>=Archive<enter><enter><sync-mailbox><enter><enter-command>echo 'Message deleted'<enter>:set resolve=yes<enter>" "Quick Delete"
macro index A ";:set resolve=no<enter><clear-flag>!<save-message>=Archive<enter><enter><sync-mailbox><enter><enter-command>echo 'Message archived'<enter>:set resolve=yes<enter>" "Quick Archive"
# Saner copy/move dialogs
macro index,pager ,c "<copy-message>?<toggle-mailboxes>" "copy a message to a mailbox"
macro index,pager ,m "<tag-thread><tag-prefix><save-message>?<toggle-mailboxes>" "move thread to a mailbox"
macro index,pager ,M "<save-message>?<toggle-mailboxes>" "move a message to a mailbox"
# search navigation
bind generic,index,attach,browser,pager n search-next # next result
bind generic,index,attach,browser,pager N search-opposite # previous result
bind generic,index / search
bind generic,index ? search-reverse
bind index,alias,query \C_ limit # ^/ to search and limit
bind index \\ vfolder-from-query # notmuch search
macro index <space>/ "<limit>all\n" "show all messages (undo limit)"
bind index ,/ show-limit
# sidebar and folders
macro index,pager <space>f "<change-folder>?" "change folder"
macro index,pager <space>F "<change-vfolder>?" "change virtual folder"
bind browser,query <return> select-entry
bind browser,query l select-entry
bind index,pager <space>e sidebar-toggle-visible # TODO: or map to L?
bind index,pager <space>E sidebar-toggle-virtual
bind index,pager e sidebar-open
bind index,pager ] sidebar-next
bind index,pager [ sidebar-prev
bind index,pager } sidebar-next-new
bind index,pager { sidebar-prev-new
# message functions
# send to editor or send to editor with ALL headers etc
macro index,pager <space>h "<pipe-message>nvim '+setlocal buftype=nofile'<enter>" "send message to editor"
bind index,pager <space>H view-raw-message
bind index,pager H display-toggle-weed
bind index,pager v view-attachments
bind index,pager,attach,compose | pipe-message
# reading a message
bind pager ,q toggle-quoted
# editor
bind editor <left> backward-char
bind editor <right> forward-char
bind editor \cb backward-char
bind editor \cf forward-char
bind editor \ca bol
bind editor \ce eol
bind editor \cw kill-word
bind editor \cu kill-line
bind editor <up> history-up
bind editor <down> history-down
bind editor \cp history-up
bind editor \cn history-down
bind editor \cr history-search
# address book functions
bind editor <Tab> complete-query
bind editor \ct complete
# add contact to Khard address book
macro index,pager ,a \
"<pipe-message>khard add-email<return>" \
"add the sender email address to khard"
# sending
bind index,pager mm mail
bind index,pager mM recall-message # edit last from drafts
bind index,pager,attach mr group-reply # answer all
bind index,pager,attach mR reply # answer SINGLE person
bind index,pager,attach mf forward-message
# composing
bind compose y send-message
bind compose e edit-message
bind compose p print-entry
bind compose P postpone-message
bind compose ,t edit-to
bind compose ,y edit-type
bind compose ,f edit-from
bind compose ,s edit-subject
bind compose ,c edit-cc
bind compose ,b edit-bcc
bind compose ,p edit-fcc
bind compose c pgp-menu
bind compose r rename-file
bind compose | filter-entry # TODO: figure out the difference to pipe-entry
bind compose K move-up
bind compose J move-down
macro compose a '<enter-command>source "neomutt-filer attach"|<enter>' "Attach with file manager"
bind compose d edit-description
bind compose D detach-file
bind compose l view-attach
bind compose <return> view-attach
bind compose t tag-entry
bind compose gg group-alternatives
bind compose gr group-related
bind compose gl group-multilingual
bind compose gu ungroup-attachment
macro attach s '<enter-command>source "neomutt-filer saveto ~/downloads"|<enter>' "Save attachment to dir"
bind attach <return> view-mailcap
bind attach l view-mailcap
# questions
# https://github.com/ceuk/mutt_dotfiles/blob/master/.config/mutt/keys/binds.muttrc
# macro index \# "<edit-label>\n" "Mark as Complete"
# macro index <return> "<display-message>\n<skip-headers>\n"
# macro index x "<limit>all\n" "show all messages (undo limit)"
# macro index \ci "<limit>~F\n" "Limit by flagged"
#
#
# # mailbox navigation
macro index,pager gi "<change-folder>=Inbox<enter>" "go to inbox"
# macro index,pager gs "<change-folder>=Sent<enter>" "go to sent"
# macro index,pager gd "<change-folder>=Drafts<enter>" "go to drafts"
# macro index,pager gt "<change-folder>=Trash<enter>" "go to trash"
# macro index,pager ga "<change-folder>=Archive<enter>" "go to archive"
# macro index,pager gj "<change-folder>=Junk<enter>" "go to junk"
# # pager navigation
# bind pager,attach h exit
# bind pager l view-attachments
# bind pager k previous-line
# bind pager j next-line
# bind pager gg top
# bind pager G bottom
#
# # markdown to html for composition
# # TODO: Check if this is working - F is a spelling mistake no?
# 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 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 "<enter-command> unset pipe_decode<enter><pipe-message>extract_url | fzf | clip<enter>" "get URLs"
#
# # Refresh far imap email
# macro index O "<sync-mailbox><shell-escape>export MBSYNC_PRE=true; neomutt-syncmail<enter>" "refresh all e-mail"
#
# # Send mail to taskwarrior
# macro index,pager ,T "<pipe-message>neomutt-2task -c -d -t<enter>" "add mail as task to taskwarrior with custom description and tags"
# macro index,pager ,t "<pipe-message>neomutt-2task -c<enter>" "add mail as task to taskwarrior"

View file

@ -0,0 +1,263 @@
# Unbind everything.. the defaults suck balls and do crazy things
bind generic,pager,editor,index,compose,browser,attach | noop
bind generic,pager,editor,index,compose,browser,attach a noop
bind generic,pager,editor,index,compose,browser,attach b noop
bind generic,pager,editor,index,compose,browser,attach c noop
bind generic,pager,editor,index,compose,browser,attach d noop
bind generic,pager,editor,index,compose,browser,attach e noop
bind generic,pager,editor,index,compose,browser,attach f noop
bind generic,pager,editor,index,compose,browser,attach g noop
bind generic,pager,editor,index,compose,browser,attach h noop
bind generic,pager,editor,index,compose,browser,attach i noop
bind generic,pager,editor,index,compose,browser,attach j noop
bind generic,pager,editor,index,compose,browser,attach k noop
bind generic,pager,editor,index,compose,browser,attach l noop
bind generic,pager,editor,index,compose,browser,attach m noop
bind generic,pager,editor,index,compose,browser,attach n noop
bind generic,pager,editor,index,compose,browser,attach o noop
bind generic,pager,editor,index,compose,browser,attach p noop
bind generic,pager,editor,index,compose,browser,attach r noop
bind generic,pager,editor,index,compose,browser,attach s noop
bind generic,pager,editor,index,compose,browser,attach t noop
bind generic,pager,editor,index,compose,browser,attach u noop
bind generic,pager,editor,index,compose,browser,attach v noop
bind generic,pager,editor,index,compose,browser,attach w noop
bind generic,pager,editor,index,compose,browser,attach x noop
bind generic,pager,editor,index,compose,browser,attach y noop
bind generic,pager,editor,index,compose,browser,attach z noop
bind generic,pager,editor,index,compose,browser,attach A noop
bind generic,pager,editor,index,compose,browser,attach B noop
bind generic,pager,editor,index,compose,browser,attach C noop
bind generic,pager,editor,index,compose,browser,attach D noop
bind generic,pager,editor,index,compose,browser,attach E noop
bind generic,pager,editor,index,compose,browser,attach F noop
bind generic,pager,editor,index,compose,browser,attach G noop
bind generic,pager,editor,index,compose,browser,attach H noop
bind generic,pager,editor,index,compose,browser,attach I noop
bind generic,pager,editor,index,compose,browser,attach J noop
bind generic,pager,editor,index,compose,browser,attach K noop
bind generic,pager,editor,index,compose,browser,attach L noop
bind generic,pager,editor,index,compose,browser,attach M noop
bind generic,pager,editor,index,compose,browser,attach N noop
bind generic,pager,editor,index,compose,browser,attach O noop
bind generic,pager,editor,index,compose,browser,attach P noop
bind generic,pager,editor,index,compose,browser,attach Q noop
bind generic,pager,editor,index,compose,browser,attach R noop
bind generic,pager,editor,index,compose,browser,attach S noop
bind generic,pager,editor,index,compose,browser,attach T noop
bind generic,pager,editor,index,compose,browser,attach U noop
bind generic,pager,editor,index,compose,browser,attach V noop
bind generic,pager,editor,index,compose,browser,attach W noop
bind generic,pager,editor,index,compose,browser,attach X noop
bind generic,pager,editor,index,compose,browser,attach Y noop
bind generic,pager,editor,index,compose,browser,attach Z noop
bind generic,pager,editor,index,compose,browser,attach <Tab> noop
bind generic,pager,editor,index,compose,browser,attach <Space> noop
bind generic,pager,editor,index,compose,browser,attach <PageUp> noop
bind generic,pager,editor,index,compose,browser,attach <PageDown> noop
bind generic,pager,editor,index,compose,browser,attach <Home> noop
bind generic,pager,editor,index,compose,browser,attach <End> noop
bind generic,pager,editor,index,compose,browser,attach <Insert> noop
bind generic,pager,editor,index,compose,browser,attach <Delete> noop
bind generic,pager,index,compose,browser,attach <Up> noop
bind generic,pager,index,compose,browser,attach <Down> noop
bind generic,pager,editor,index,compose,browser,attach <Left> noop
bind generic,pager,editor,index,compose,browser,attach <Right> noop
bind generic,pager,editor,index,compose,browser,attach <Enter> noop
bind generic,pager,editor,index,compose,browser,attach <Return> noop
bind generic,pager,editor,index,compose,browser,attach 1 noop
bind generic,pager,editor,index,compose,browser,attach 2 noop
bind generic,pager,editor,index,compose,browser,attach 3 noop
bind generic,pager,editor,index,compose,browser,attach 4 noop
bind generic,pager,editor,index,compose,browser,attach 5 noop
bind generic,pager,editor,index,compose,browser,attach 6 noop
bind generic,pager,editor,index,compose,browser,attach 7 noop
bind generic,pager,editor,index,compose,browser,attach 8 noop
bind generic,pager,editor,index,compose,browser,attach 9 noop
bind generic,pager,editor,index,compose,browser,attach 0 noop
bind generic,pager,editor,index,compose,browser,attach ! noop
bind generic,pager,editor,index,compose,browser,attach @ noop
bind generic,pager,editor,index,compose,browser,attach $ noop
bind generic,pager,editor,index,compose,browser,attach % noop
bind generic,pager,editor,index,compose,browser,attach ^ noop
bind generic,pager,editor,index,compose,browser,attach & noop
bind generic,pager,editor,index,compose,browser,attach * noop
bind generic,pager,editor,index,compose,browser,attach ( noop
bind generic,pager,editor,index,compose,browser,attach ) noop
bind generic,pager,editor,index,compose,browser,attach \Ca noop
bind generic,pager,editor,index,compose,browser,attach \Cb noop
bind generic,pager,editor,index,compose,browser,attach \Cc noop
bind generic,pager,editor,index,compose,browser,attach \Cd noop
bind generic,pager,editor,index,compose,browser,attach \Ce noop
bind generic,pager,editor,index,compose,browser,attach \Cf noop
bind generic,pager,editor,index,compose,browser,attach \Cg noop
bind generic,pager,editor,index,compose,browser,attach \Ch noop
bind generic,pager,editor,index,compose,browser,attach \Ci noop
bind generic,pager,editor,index,compose,browser,attach \Cj noop
bind generic,pager,editor,index,compose,browser,attach \Ck noop
bind generic,pager,editor,index,compose,browser,attach \Cl noop
bind generic,pager,editor,index,compose,browser,attach \Cm noop
bind generic,pager,editor,index,compose,browser,attach \Cn noop
bind generic,pager,editor,index,compose,browser,attach \Co noop
bind generic,pager,editor,index,compose,browser,attach \Cp noop
bind generic,pager,editor,index,compose,browser,attach \Cq noop
bind generic,pager,editor,index,compose,browser,attach \Cr noop
bind generic,pager,editor,index,compose,browser,attach \Cs noop
bind generic,pager,editor,index,compose,browser,attach \Ct noop
bind generic,pager,editor,index,compose,browser,attach \Cv noop
bind generic,pager,editor,index,compose,browser,attach \Cw noop
bind generic,pager,editor,index,compose,browser,attach \Cxe noop
bind generic,pager,editor,index,compose,browser,attach \Cx noop
bind generic,pager,editor,index,compose,browser,attach \Cy noop
bind generic,pager,editor,index,compose,browser,attach \Cz noop
bind generic,pager,editor,index,compose,browser,attach \CA noop
bind generic,pager,editor,index,compose,browser,attach \CB noop
bind generic,pager,editor,index,compose,browser,attach \CC noop
bind generic,pager,editor,index,compose,browser,attach \CD noop
bind generic,pager,editor,index,compose,browser,attach \CE noop
bind generic,pager,editor,index,compose,browser,attach \CF noop
bind generic,pager,editor,index,compose,browser,attach \CG noop
bind generic,pager,editor,index,compose,browser,attach \CH noop
bind generic,pager,editor,index,compose,browser,attach \CI noop
bind generic,pager,editor,index,compose,browser,attach \CJ noop
bind generic,pager,editor,index,compose,browser,attach \CK noop
bind generic,pager,editor,index,compose,browser,attach \CL noop
bind generic,pager,editor,index,compose,browser,attach \CM noop
bind generic,pager,editor,index,compose,browser,attach \CN noop
bind generic,pager,editor,index,compose,browser,attach \CO noop
bind generic,pager,editor,index,compose,browser,attach \CP noop
bind generic,pager,editor,index,compose,browser,attach \CQ noop
bind generic,pager,editor,index,compose,browser,attach \CR noop
bind generic,pager,editor,index,compose,browser,attach \CS noop
bind generic,pager,editor,index,compose,browser,attach \CT noop
bind generic,pager,editor,index,compose,browser,attach \CV noop
bind generic,pager,editor,index,compose,browser,attach \CW noop
bind generic,pager,editor,index,compose,browser,attach \CX noop
bind generic,pager,editor,index,compose,browser,attach \CY noop
bind generic,pager,editor,index,compose,browser,attach \CZ noop
bind generic,pager,editor,index,compose,browser,attach \C<Tab> noop
bind generic,pager,editor,index,compose,browser,attach \C<Space> noop
bind generic,pager,editor,index,compose,browser,attach \C<PageUp> noop
bind generic,pager,editor,index,compose,browser,attach \C<PageDown> noop
bind generic,pager,editor,index,compose,browser,attach \C<Home> noop
bind generic,pager,editor,index,compose,browser,attach \C<End> noop
bind generic,pager,editor,index,compose,browser,attach \C<Insert> noop
bind generic,pager,editor,index,compose,browser,attach \C<Delete> noop
bind generic,pager,editor,index,compose,browser,attach \C<Up> noop
bind generic,pager,editor,index,compose,browser,attach \C<Down> noop
bind generic,pager,editor,index,compose,browser,attach \C<Left> noop
bind generic,pager,editor,index,compose,browser,attach \C<Right> noop
bind generic,pager,editor,index,compose,browser,attach \C<Enter> noop
bind generic,pager,editor,index,compose,browser,attach \C<Return> noop
bind generic,pager,editor,index,compose,browser,attach \C1 noop
bind generic,pager,editor,index,compose,browser,attach \C2 noop
bind generic,pager,editor,index,compose,browser,attach \C3 noop
bind generic,pager,editor,index,compose,browser,attach \C4 noop
bind generic,pager,editor,index,compose,browser,attach \C5 noop
bind generic,pager,editor,index,compose,browser,attach \C6 noop
bind generic,pager,editor,index,compose,browser,attach \C7 noop
bind generic,pager,editor,index,compose,browser,attach \C8 noop
bind generic,pager,editor,index,compose,browser,attach \C9 noop
bind generic,pager,editor,index,compose,browser,attach \C0 noop
bind generic,pager,editor,index,compose,browser,attach \C! noop
bind generic,pager,editor,index,compose,browser,attach \C$ noop
bind generic,pager,editor,index,compose,browser,attach \C% noop
bind generic,pager,editor,index,compose,browser,attach \C^ noop
bind generic,pager,editor,index,compose,browser,attach \C& noop
bind generic,pager,editor,index,compose,browser,attach \C* noop
bind generic,pager,editor,index,compose,browser,attach \C( noop
bind generic,pager,editor,index,compose,browser,attach \C) noop
bind generic,pager,editor,index,compose,browser,attach <Esc>a noop
bind generic,pager,editor,index,compose,browser,attach <Esc>b noop
bind generic,pager,editor,index,compose,browser,attach <Esc>c noop
bind generic,pager,editor,index,compose,browser,attach <Esc>d noop
bind generic,pager,editor,index,compose,browser,attach <Esc>e noop
bind generic,pager,editor,index,compose,browser,attach <Esc>f noop
bind generic,pager,editor,index,compose,browser,attach <Esc>g noop
bind generic,pager,editor,index,compose,browser,attach <Esc>h noop
bind generic,pager,editor,index,compose,browser,attach <Esc>i noop
bind generic,pager,editor,index,compose,browser,attach <Esc>j noop
bind generic,pager,editor,index,compose,browser,attach <Esc>k noop
bind generic,pager,editor,index,compose,browser,attach <Esc>l noop
bind generic,pager,editor,index,compose,browser,attach <Esc>m noop
bind generic,pager,editor,index,compose,browser,attach <Esc>n noop
bind generic,pager,editor,index,compose,browser,attach <Esc>o noop
bind generic,pager,editor,index,compose,browser,attach <Esc>p noop
bind generic,pager,editor,index,compose,browser,attach <Esc>q noop
bind generic,pager,editor,index,compose,browser,attach <Esc>r noop
bind generic,pager,editor,index,compose,browser,attach <Esc>s noop
bind generic,pager,editor,index,compose,browser,attach <Esc>t noop
bind generic,pager,editor,index,compose,browser,attach <Esc>u noop
bind generic,pager,editor,index,compose,browser,attach <Esc>v noop
bind generic,pager,editor,index,compose,browser,attach <Esc>w noop
bind generic,pager,editor,index,compose,browser,attach <Esc>x noop
bind generic,pager,editor,index,compose,browser,attach <Esc>y noop
bind generic,pager,editor,index,compose,browser,attach <Esc>z noop
bind generic,pager,editor,index,compose,browser,attach <Esc>A noop
bind generic,pager,editor,index,compose,browser,attach <Esc>B noop
bind generic,pager,editor,index,compose,browser,attach <Esc>C noop
bind generic,pager,editor,index,compose,browser,attach <Esc>D noop
bind generic,pager,editor,index,compose,browser,attach <Esc>E noop
bind generic,pager,editor,index,compose,browser,attach <Esc>F noop
bind generic,pager,editor,index,compose,browser,attach <Esc>G noop
bind generic,pager,editor,index,compose,browser,attach <Esc>H noop
bind generic,pager,editor,index,compose,browser,attach <Esc>I noop
bind generic,pager,editor,index,compose,browser,attach <Esc>J noop
bind generic,pager,editor,index,compose,browser,attach <Esc>K noop
bind generic,pager,editor,index,compose,browser,attach <Esc>L noop
bind generic,pager,editor,index,compose,browser,attach <Esc>M noop
bind generic,pager,editor,index,compose,browser,attach <Esc>N noop
bind generic,pager,editor,index,compose,browser,attach <Esc>O noop
bind generic,pager,editor,index,compose,browser,attach <Esc>P noop
bind generic,pager,editor,index,compose,browser,attach <Esc>Q noop
bind generic,pager,editor,index,compose,browser,attach <Esc>R noop
bind generic,pager,editor,index,compose,browser,attach <Esc>S noop
bind generic,pager,editor,index,compose,browser,attach <Esc>T noop
bind generic,pager,editor,index,compose,browser,attach <Esc>U noop
bind generic,pager,editor,index,compose,browser,attach <Esc>V noop
bind generic,pager,editor,index,compose,browser,attach <Esc>W noop
bind generic,pager,editor,index,compose,browser,attach <Esc>X noop
bind generic,pager,editor,index,compose,browser,attach <Esc>Y noop
bind generic,pager,editor,index,compose,browser,attach <Esc>Z noop
bind generic,pager,editor,index,compose,browser,attach <Esc><Tab> noop
bind generic,pager,editor,index,compose,browser,attach <Esc><Space> noop
bind generic,pager,editor,index,compose,browser,attach <Esc><PageUp> noop
bind generic,pager,editor,index,compose,browser,attach <Esc><PageDown> noop
bind generic,pager,editor,index,compose,browser,attach <Esc><Home> noop
bind generic,pager,editor,index,compose,browser,attach <Esc><End> noop
bind generic,pager,editor,index,compose,browser,attach <Esc><Insert> noop
bind generic,pager,editor,index,compose,browser,attach <Esc><Delete> noop
bind generic,pager,editor,index,compose,browser,attach <Esc><Up> noop
bind generic,pager,editor,index,compose,browser,attach <Esc><Down> noop
bind generic,pager,editor,index,compose,browser,attach <Esc><Left> noop
bind generic,pager,editor,index,compose,browser,attach <Esc><Right> noop
bind generic,pager,editor,index,compose,browser,attach <Esc><Enter> noop
bind generic,pager,editor,index,compose,browser,attach <Esc><Return> noop
bind generic,pager,editor,index,compose,browser,attach <Esc>1 noop
bind generic,pager,editor,index,compose,browser,attach <Esc>2 noop
bind generic,pager,editor,index,compose,browser,attach <Esc>3 noop
bind generic,pager,editor,index,compose,browser,attach <Esc>4 noop
bind generic,pager,editor,index,compose,browser,attach <Esc>5 noop
bind generic,pager,editor,index,compose,browser,attach <Esc>6 noop
bind generic,pager,editor,index,compose,browser,attach <Esc>7 noop
bind generic,pager,editor,index,compose,browser,attach <Esc>8 noop
bind generic,pager,editor,index,compose,browser,attach <Esc>9 noop
bind generic,pager,editor,index,compose,browser,attach <Esc>0 noop
bind generic,pager,editor,index,compose,browser,attach <Esc>! noop
bind generic,pager,editor,index,compose,browser,attach <Esc>@ noop
bind generic,pager,editor,index,compose,browser,attach <Esc>$ noop
bind generic,pager,editor,index,compose,browser,attach <Esc>% noop
bind generic,pager,editor,index,compose,browser,attach <Esc>^ noop
bind generic,pager,editor,index,compose,browser,attach <Esc>& noop
bind generic,pager,editor,index,compose,browser,attach <Esc>* noop
bind generic,pager,editor,index,compose,browser,attach <Esc>( noop
bind generic,pager,editor,index,compose,browser,attach <Esc>) noop

View file

@ -1,93 +0,0 @@
# index navigation
bind index l display-message
bind index L limit
bind index,pager g noop # don't send group-replies with g
bind index gg first-entry
bind index G last-entry
bind index <space> collapse-thread
macro index J <tag-entry> "tag current and select next entry"
macro index K <tag-entry><previous-undeleted><previous-undeleted> "tag current and select previous entry"
macro index t <tag-entry><previous-undeleted> "tag current entry"
# 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~U<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>" "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 dd delete-subthread
bind index,pager dt delete-thread
bind pager,index gt next-thread
bind pager,index gT previous-thread
bind pager,index za collapse-thread
bind pager,index zA collapse-all
bind pager,index zr reconstruct-thread
bind pager,index zR entire-thread
# Saner copy/move dialogs
macro index,pager ,c "<copy-message>?<toggle-mailboxes>" "copy a message to a mailbox"
macro index,pager ,m "<tag-thread><tag-prefix><save-message>?<toggle-mailboxes>" "move thread to a mailbox"
macro index,pager ,M "<save-message>?<toggle-mailboxes>" "move a message to a mailbox"
# Email completion bindings
bind editor <Tab> complete-query
bind editor ^T complete
# add contact to Khard address book
macro index,pager ,a \
"<pipe-message>khard add-email<return>" \
"add the sender email address to khard"
# mailbox navigation
macro index,pager gi "<change-folder>=Inbox<enter>" "go to inbox"
macro index,pager gs "<change-folder>=Sent<enter>" "go to sent"
macro index,pager gd "<change-folder>=Drafts<enter>" "go to drafts"
macro index,pager gt "<change-folder>=Trash<enter>" "go to trash"
macro index,pager ga "<change-folder>=Archive<enter>" "go to archive"
macro index,pager gj "<change-folder>=Junk<enter>" "go to junk"
# sidebar navigation
bind index,pager B sidebar-toggle-visible
bind index,pager <down> sidebar-next
bind index,pager <up> sidebar-prev
bind index,pager <right> sidebar-open
# search navigation
macro index a "<limit>all\n" "show all messages (undo limit)"
bind browser,index,pager N search-opposite # vim-like search
bind index \\ vfolder-from-query # notmuch search
# pager navigation
bind pager,attach h exit
bind pager l view-attachments
bind pager k previous-line
bind pager j next-line
bind pager gg top
bind pager G bottom
# markdown to html for composition
macro compose ,m "F pandoc -s -f markdown -t html \ny^T^Utext/html; charset=UTF-8\n" "Convert from MD to HTML"
# attach and save file attachments
macro compose a '<enter-command>source "neomutt-filer attach"|<enter>' "Attach with file manager"
macro attach s '<enter-command>source "neomutt-filer saveto"|<enter>' "Save attachment to dir"
# since we unbound the original g
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 "<enter-command> unset pipe_decode<enter><pipe-message>extract_url | fzf | clip<enter>" "get URLs"
# Refresh far imap email
macro index O "<sync-mailbox><shell-escape>export MBSYNC_PRE=true; neomutt-syncmail<enter>" "refresh all e-mail"
# Send mail to taskwarrior
macro index,pager ,T "<pipe-message>neomutt-2task -c -d -t<enter>" "add mail as task to taskwarrior with custom description and tags"
macro index,pager ,t "<pipe-message>neomutt-2task -c<enter>" "add mail as task to taskwarrior"

View file

@ -1,5 +1,7 @@
source colors
source settings
source maps
source keys/unbind
source keys/bind
source account