#
# This file contains commands to change the keybindings in Mutt to be
# similar to those of PINE 3.95.
#

bind index v display-message
bind index p previous-undeleted
bind index ' ' next-page
bind index c mail
bind index g change-folder
bind index / search
bind index y print-message
bind index x sync-mailbox
bind index $ sort-mailbox
bind index a tag-prefix
#macro index G "!offlineimap -a fastmail-inbox,bantu-inbox,ako-inbox -u Quiet &<enter>"

# Not possible to simulate zoom-out...
macro index z ltagged\r

bind pager p previous-undeleted
bind pager ' ' next-page
bind pager g change-folder
bind pager c mail
bind pager w search
bind pager y print-message
bind pager \n noop	# PINE prints "No default action for this menu."
bind pager k previous-line
bind pager j next-line
bind pager G bottom     # just like vi and less
bind pager R group-reply

bind compose \cx send-message

macro index \cb |urlview\n
macro pager \cb |urlview\n

macro index,pager A |'abook --add-email'\n
macro editor \t \ct

set markers=no # fix multiline url wrapping
set query_command="abook --mutt-query '%s'"
set text_flowed=yes
set editor="nvim"
#set editor="vim -c \"setlocal tw=72 fo+=aw spell spelllang=en\"

#set save_address
set fast_reply
set hdr_format="%Z %3C %{%b %d} %-19.19L (%5c) %s"

set mbox_type=Maildir
set folder=~/mail/sonatype
set spoolfile=+INBOX
set hostname=sonatype.com

set use_domain

mailboxes ~/mail/sonatype/INBOX ~/mail/fm/INBOX

set mail_check=30
set timeout=15
set beep=yes

# sort mail in the order it is received
set sort=date-received

set delete=yes

set help = no

set move = no  # don't ask me about mbox
set wait_key = no  # don't ask me to press a key after shell commands

# these are the headers I want to see
ignore *
unignore from: date subject to cc reply-to x-mailer: user-agent:
unignore organization: organisation: x-mailer: x-newsreader: x-mailing-list:
hdr_order Date: From: To: Cc: Subject:


# html-ized mail
auto_view text/html 
auto_view text/calendar
alternative_order text/enriched text/plain text/html text

source ~/.mutt/crypto

# colors
# source ~/.mutt/colorscheme
source ~/.mutt/fastmail

# colors are in the above- be sure that deleted message colors are correct
#color index black default ~= # dup-ed messages
#color index black default ~D # delete-ed messages
color index         black           default         "~D"                        # deleted messages

set charset=utf-8
