Skip to content

Instantly share code, notes, and snippets.

@jay16
Created April 30, 2015 09:11
Show Gist options
  • Save jay16/e3eb97589ee7f41c5195 to your computer and use it in GitHub Desktop.
Save jay16/e3eb97589ee7f41c5195 to your computer and use it in GitHub Desktop.
.muttrc.bind
# ~/.muttrc.bind
#
# curl http://bronski.net/data/bind > ~/.muttrc.bind
# echo "source ~/.muttrc.bind" >> ~/.muttrc
## Command bind :
## Syntax unto version 0.60: bind <key> <function-name> <menu-name>
## Syntax From version 0.61: bind <menu-name> <key> <function-name>
## Values for <menu-name>:
## attach, folder-menu, alias-menu; index; pager.
## Special values for <key>: pageup, pagedown, up, down, left, right
## Description: MUTT allows you to bind a command to keys.
## For more info see page
## http://www.math.fu-berlin.de/~guckes/mutt/mutt.manual.html#bind or
## http://www.cs.hmc.edu/~me/mutt/bind.html .
## There are some keystrokes that I am used with other programs:
## ========================
## Bindings for attach menu
## ========================
bind attach ' ' select-entry
bind attach \Cg exit
bind index P recall-message # 'R'ecall-message move to 'P' [0.46]
# bind index L bottom-of-page # overrides 'L'ist-reply
bind index R list-reply # 'L'ist-reply moved to 'R'
## ========================
## Bindings for editor
## ========================
# bind editor \C? backspace
## ==============================
## Bindings for index *and* pager
## ==============================
## Jumping to the next mail that is still unread.
## Even though I use both New and Old mails
## I usually prefer "jump-unread" to "jump-new".
## The TAB key (\t) is convenient for this.
## To allow jumping to the previous unread mail
## I use the comma as a prefix to this command:
bind index \t next-unread
bind pager \t next-unread
bind index ,\t previous-unread
bind pager ,\t previous-unread
## ======================
## Bindings for index
## ======================
# index bindings - obvious stuff
bind index pagedown next-page
bind index pageup previous-page
# bind index home first-message # error with mutt-0.89.1
# bind index end last-message # error with mutt-0.89.1
# index bindings - vi (editor) style
# bind index \Cg group-reply # \Cg --> "group-reply"
# bind index g first-message # g was "group-reply"
# bind index G last-message # error with mutt-0.89.1
bind index \Cb previous-page
bind index \Cf next-page # \Cf was 'f'orget-passphrase
# bind index \Cv forget-passphrase # \Cv --> 'f'orget-passphrase
# index bindings - nn (newsreader) style
bind index < previous-page
bind index > next-page
# bind index ^ first-message # error with mutt-0.89.1
# bind index $ last-message # error with mutt-0.89.1
bind index \Cx sync-mailbox # \Cx ->"sync-mailbox"
# index bindings - elm (mailer) style
bind index + next-page
bind index - previous-page
macro index V "!mutt -v | less"
macro index "+so" ":source "
## ===========================
## Bindings for pager
## ===========================
# pager bindings - vi style bindings
bind pager \Cu half-up
bind pager \Cd half-down
bind pager \Cm next-line
bind pager \Ce next-line
bind pager \Cy previous-line
bind pager + next-line
bind pager - previous-line
bind pager ' ' next-page
bind pager \Cf next-page
bind pager \Cn next-page
bind pager - previous-page
bind pager \Cb previous-page # was "browse-url"
# bind pager ,B browse-url # compensate for \Cb
bind pager \Cn half-down
bind pager \Cp half-up
bind pager t top
bind pager ^ top
bind pager G bottom
bind pager $ bottom
bind pager / search
bind pager n next-undeleted
# bind pager N
bind pager p previous-undeleted
bind pager P print-message
bind pager R list-reply
bind pager L list-reply
## Adding a prefix to index mail commands
## NOTE: Using ESC as prefix requires a small pause
## between ESC and the following key - therefore
## I use the comma as the prefix key :-)
## I once used the backslash key - but \n, \r, and \t
## are used for newline, return, and tab. *sigh*
bind pager ,b bounce-message
bind pager ,f forward-message
bind pager ,g group-reply
bind pager ,m mail
bind pager ,L list-reply
bind pager ,n reply
bind pager ,r reply
bind pager ,a reply # 'a' is for "answer"
## jump commands
bind pager ,j next-undeleted
bind pager ,k previous-undeleted
## Bind default mail commands to jump commands
bind pager backspace previous-line
# bind pager delete previous-line # yields error!
bind pager b previous-page
bind pager f next-page
bind pager g top
bind pager j next-line
bind pager k previous-line
bind pager m noop
bind pager L noop
bind pager r noop
bind pager : enter-command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment