mutt/muttrc @ 3438f76a9e10

Goodbye Slimv, hello Fireplace
author Steve Losh <steve@stevelosh.com>
date Fri, 14 Jun 2013 20:47:45 -0400
parents 5ddfd5a61ea1
children 78862604f6c8
# Paths {{{

set alias_file       = ~/.mutt/alias         # where to store aliases
set header_cache     = ~/.mutt/cache/headers # where to store headers
set message_cachedir = ~/.mutt/cache/bodies  # where to store bodies
set certificate_file = ~/.mutt/certificates  # where to store certs
set mailcap_path     = ~/.mutt/mailcap       # entries for filetypes
set tmpdir           = ~/.mutt/temp          # where to keep temp files
set signature        = ~/.mutt/sig           # my signature file

# }}}
# Editor {{{

# Use Vim to compose email, with a few default options.
set editor = "/usr/local/bin/vim -c 'normal! }' -c 'redraw'"

# }}}
# Contacts {{{

# Use the OS X address book
set query_command = "contacts -Sf '%eTOKEN%n' '%s' | sed -e 's/TOKEN/\t/g'"
bind editor <Tab> complete-query
bind editor ^T    complete

# }}}
# Basic Options {{{

source ~/.vim/bundle/badwolf/contrib/badwolf.muttrc

set wait_key = no        # shut up, mutt
set mbox_type = Maildir  # mailbox type
set folder = ~/.mail     # mailbox location
set timeout = 3          # idle time before scanning
set mail_check = 0       # minimum time between scans
unset move               # gmail does that
set delete               # don't ask, just do
unset confirmappend      # don't ask, just do!
set quit                 # don't ask, just do!!
unset mark_old           # read/new is good enough for me
set beep_new             # bell on new mails
set pipe_decode          # strip headers and eval mimes when piping
set thorough_search      # strip headers and eval mimes before searching

# }}}
# Sidebar Patch {{{

set sidebar_delim   = '  │'
set sidebar_visible = yes
set sidebar_width   = 24
color sidebar_new color221 color233
bind index,pager <down>   sidebar-next
bind index,pager <up>     sidebar-prev
bind index,pager <right>  sidebar-open

# }}}
# Status Bar {{{

set status_chars  = " *%A"
set status_format = "───[ Folder: %f ]───[%r%m messages%?n? (%n new)?%?d? (%d to delete)?%?t? (%t tagged)? ]───%>─%?p?( %p postponed )?───"

# }}}
# Index View Options {{{

set date_format = "%m/%d"
set index_format = "[%Z]  %D  %-20.20F  %s"
set sort = threads                         # like gmail
set sort_aux = reverse-last-date-received  # like gmail
set uncollapse_jump                        # don't collapse on an unread message
set sort_re                                # thread based on regex
set reply_regexp = "^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*"

# }}}
# Pager View Options {{{

set pager_index_lines = 10 # number of index lines to show
set pager_context = 3      # number of context lines to show
set pager_stop             # don't go to next message automatically
set menu_scroll            # scroll in menus
set tilde                  # show tildes like in vim
unset markers              # no ugly plus signs
set quote_regexp = "^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+"
alternative_order text/plain text/enriched text/html

set display_filter = "clean_mail" # clean up shitty mail

# }}}
# Compose View Options {{{

set realname = "Steve Losh"          # who am i?
set envelope_from                    # which from?
set sig_dashes                       # dashes before sig
set edit_headers                     # show headers when composing
set fast_reply                       # skip to compose when replying
set askcc                            # ask for CC:
set fcc_attach                       # save attachments with the body
unset mime_forward                   # forward attachments as part of body
set forward_format = "Fwd: %s"       # format of subject when forwarding
set forward_decode                   # decode when forwarding
set attribution = "On %d, %n wrote:" # format of quoting header
set reply_to                         # reply to Reply to: field
set reverse_name                     # reply as whomever it was to
set include                          # include message in replies
set forward_quote                    # include message in forwards

# }}}
# Attachment View Options {{{

set attach_format = "[%D %t] %2n [%-7.7m/%10.10M] %.40d %> [%s] "

# }}}
# Headers {{{

ignore *                                # ignore all headers
unignore from: to: cc: date: subject:   # show only these
unhdr_order *
hdr_order from: to: cc: date: subject:  # and in this order

# }}}
# steve@stevelosh.com {{{

# Default inbox.
set spoolfile = "+steve-stevelosh.com/INBOX"

# Alternate email addresses.
alternates sjl@pculture.org still\.?life@gmail.com steve@ladyluckblues.com steve@pculture.org

# Mailboxes to show in the sidebar.
mailboxes +steve-stevelosh.com/INBOX \
          +steve-stevelosh.com/vim \
          +steve-stevelosh.com/clojure \
          +steve-stevelosh.com/python \
          +steve-stevelosh.com/mercurial \
          +steve-stevelosh.com/archive \
          +steve-stevelosh.com/sent \
          +steve-stevelosh.com/drafts \
          +temporary/search \

# Other special folders.
set mbox      = "+steve-stevelosh.com/archive"
set postponed = "+steve-stevelosh.com/drafts"

# Sending email.
set from     = "steve@stevelosh.com"
set sendmail = "/usr/local/bin/msmtp -a stevelosh"
set sendmail_wait = 0 # no please don't silently fail, email is important
unset record

# }}}
# Account Hooks {{{

# folder-hook steve-stevelosh.com/* source ~/.mutt/steve-stevelosh.com.muttrc

# }}}
# Key Bindings {{{

# Index {{{

bind index \#       noop
bind index R        group-reply
bind index <tab>    sync-mailbox
bind index k        previous-entry
bind index j        next-entry
bind index gg       first-entry
bind index G        last-entry
bind index p        recall-message
bind index <space>  collapse-thread
bind index N        search-opposite
macro index s "<pipe-message>cat > ~/Desktop/"  "save message as"

# Mark all as read
macro index \Cr "T~U<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>" "mark all messages as read"

# Sync email
macro index O "<shell-escape>offlineimap<enter>"           "run offlineimap to sync all mail"
macro index o "<shell-escape>offlineimap -qf INBOX<enter>" "run offlineimap to sync inbox"

# Saner copy/move dialogs
macro index C "<copy-message>?<toggle-mailboxes>" "copy a message to a mailbox"
macro index M "<save-message>?<toggle-mailboxes>" "move a message to a mailbox"

# Quickly change mailboxes
macro index \' "<change-folder>+steve-stevelosh.com/INBOX<enter>"   "go to stevelosh/INBOX"
macro index \" "<change-folder>+steve-stevelosh.com/archive<enter>" "go to stevelosh/archive"

# Search with notmuch
macro index S "<enter-command>unset wait_key<enter><shell-escape>mutt-notmuch-py -G ~/.mail/temporary/search<enter><change-folder-readonly>+temporary/search<enter>" "search mail (using notmuch)"

# Unlimit (show [a]ll)
macro index a "<limit>all\n" "show all messages (undo limit)"

# }}}
# Pager {{{

bind pager \# noop
bind pager k  previous-line
bind pager j  next-line
bind pager gg top
bind pager G  bottom

bind pager R  group-reply
bind pager N  search-opposite

macro pager \Cu "|urlview<enter>" "call urlview to open links"
macro pager s "<pipe-message>cat > ~/Desktop/"  "save message as"

# Quickly change mailboxes
macro pager \' "<exit><change-folder>+steve-stevelosh.com/INBOX<enter>"   "go to stevelosh/INBOX"
macro pager \" "<exit><change-folder>+steve-stevelosh.com/archive<enter>" "go to stevelosh/archive"

# }}}
# Compose {{{

bind compose p postpone-message

# }}}
# Attachment {{{

# View, god dammit!
bind attach <return> view-mailcap

# }}}
# "Open in Vim" {{{

macro index,pager V "|vim -c 'setlocal ft=mail' -c 'setlocal buftype=nofile' -<enter>"              "open in vim"
macro index,pager M "|mvim -c 'setlocal ft=mail' -c 'setlocal buftype=nofile' - >/dev/null<enter>"  "open in macvim"

# }}}

# }}}