forked from vveleva/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmuttrc
262 lines (235 loc) · 13.2 KB
/
muttrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
source ~/.muttrc.local
set folder = "imaps://imap.gmail.com:993"
set spoolfile = "+INBOX"
set postponed = "+[Gmail]/Drafts"
set header_cache = ~/.mutt/cache/headers
set message_cachedir = ~/.mutt/cache/bodies
set certificate_file = ~/.mutt/certificates
set move = no
set smtp_authenticators = 'gssapi:login'
set TERM=xterm-256color
set date_format="%y-%m-%d %T"
set index_format="%2C | %Z [%d] %-30.30F (%-4.4c) %s"
set index_format="%Z %{%Y %b %e %H:%M} %?X?(%X)& ? %-22.22F %.100s %> %5c
"
## Theme kindly inspired from
## http://nongeekshandbook.blogspot.ie/2009/03/mutt-color-configuration.html
## Colours for items in the index
color index brightcyan default ~N
color index black green ~O
color index brightyellow default ~F
color index black green ~T
color index brightred default ~D
mono index bold ~N
mono index bold ~F
mono index bold ~T
mono index bold ~D
## Highlights inside the body of a message.
## URLs
color body brightblue default "(http|ftp|news|telnet|finger)://[^ \"\t\r\n]*"
color body yellow default "mailto:[-a-z_0-9.]+@[-a-z_0-9.]+"
mono body bold "(http|ftp|news|telnet|finger)://[^ \"\t\r\n]*"
mono body bold "mailto:[-a-z_0-9.]+@[-a-z_0-9.]+"
## Email addresses.
color body brightmagenta default "[-a-z_0-9.%$]+@[-a-z_0-9.]+\\.[-a-z][-a-z]+"
## Header
color header green default "^from:"
color header green default "^to:"
color header green default "^cc:"
color header green default "^date:"
color header yellow default "^newsgroups:"
color header yellow default "^reply-to:"
color header brightcyan default "^subject:"
color header red default "^x-spam-rule:"
color header green default "^x-mailer:"
color header yellow default "^message-id:"
color header yellow default "^Organization:"
color header yellow default "^Organisation:"
color header yellow default "^User-Agent:"
color header yellow default "^message-id: .*pine"
color header yellow default "^X-Fnord:"
color header yellow default "^X-WebTV-Stationery:"
color header red default "^x-spam-rule:"
color header green default "^x-mailer:"
color header yellow default "^message-id:"
color header yellow default "^Organization:"
color header yellow default "^Organisation:"
color header yellow default "^User-Agent:"
color header yellow default "^message-id: .*pine"
color header yellow default "^X-Fnord:"
color header yellow default "^X-WebTV-Stationery:"
color header yellow default "^X-Message-Flag:"
color header yellow default "^X-Spam-Status:"
color header yellow default "^X-SpamProbe:"
color header red default "^X-SpamProbe: SPAM"
## Coloring quoted text - coloring the first 7 levels:
color quoted cyan default
color quoted1 yellow default
color quoted2 red default
color quoted3 green default
color quoted4 cyan default
color quoted5 yellow default
color quoted6 red default
color quoted7 green default
## Default color definitions
#color hdrdefault white green
color signature brightmagenta black
color indicator black blue
color attachment blue color234
color error red black
color normal white default
color message white default
color search brightwhite magenta
color status white color236
color status color236 color233
color tree brightblue default
color tilde green default
color bold brightyellow black
#color underline magenta black
color markers brightcyan default
## Colour definitions when on a mono screen
mono bold bold
mono underline underline
mono indicator reverse
# regular new messages
color index black green "~N !~T !~F !~p !~P"
# regular tagged messages
color index black cyan "~T !~F !~p !~P"
# regular flagged messages
color index black red "~F !~p !~P"
# messages to me
color index yellow default "~p !~N !~T !~F !~P"
color index brightyellow white "~p ~N !~T !~F !~P"
color index yellow cyan "~p ~T !~F !~P"
color index yellow red "~p ~F !~P"
# messages from me
color index green default "~P !~N !~T !~F"
color index green white "~P ~N !~T !~F"
color index green cyan "~P ~T !~F"
color index green red "~P ~F"
color index magenta red "~x
# big messages
color index brightred default "!~N ~z 102400-"
color index brightred cyan "~T !~F !~p !~P ~z 102400-"
color index brightred white "~N ~z 102400-"
# deleted messages
color index red default "!~N ~D"
color index red white "~N ~D"
# mutt configuration : bindings : gmail
# general/unfiled/reference -------------------------------------------
#macro index "D" "<save-message>+gmail/trash<enter>" "Move message to the trash"
#macro index "S" "<save-message>+gmail/spam<enter>" "Mark message as spam"
#macro index "P" "<next-unread-mailbox>" "Jump to next mailbox with unread messages"
#macro index "K" "<save-message>+gmail/keep<enter>" "Mark message as keep"
#macro index "P" "<save-message>+gmail/important<enter><undelete-message>" "Mark message as spam"
#macro index "P" "<copy-message>+gmail/important<enter>" "Mark message as spam"
#macro index,pager y "<enter-command>unset trash\n <delete-message>" "Gmail archive message"
#macro index,pager d "<enter-command>set trash=\"imaps://imap.googlemail.com/[GMail]/Bin\"\n <delete-message>" "Gmail delete message"
# changing folders ----------------------------------------------------
macro index,pager gi "<change-folder>!<enter>" "Go to inbox"
macro index,pager gl "<change-folder>^<enter>" "Go to last"
macro index,pager gp "<change-folder>=important<enter>" "Go to priority inbox" # [Gmail]/Important (p=priority)
macro index,pager ga "<change-folder>=archived<enter>" "Go to all mail" # [Gmail]/All
macro index,pager gs "<change-folder>=flagged<enter>" "Go to starred messages" # [Gmail]/Starred
macro index,pager gf "<change-folder>=flagged<enter>" "Go to starred messages" # [Gmail]/Starred
macro index,pager gd "<change-folder>=drafts<enter>" "Go to drafts" # [Gmail]/Drafts
macro index,pager gt "<change-folder>=sent<enter>" "Go to sent" # [Gmail]/Drafts
bind index,pager gu next-unread-mailbox
bind index,pager o change-folder # like vim "open"
# show/hide things ----------------------------------------------------
bind index zA collapse-thread # toggle thread, similar to vim folding (though inverted)
bind index za collapse-all # toggle all thread, similar to vim folding
bind pager zA toggle-quoted # toggle quote section, similar to vim folding
bind pager za toggle-quoted # toggle quote section, similar to vim folding
bind index,pager H display-toggle-weed # show raw header
# deleting/editing/flagging -------------------------------------------
macro index,pager "#" "<save-message>+trash<enter>" "Move message to trash" # [Gmail]/Trash
macro index,pager "!" "<save-message>+spam<enter>" "Mark message as spam" # [Gmail]/Spam
macro index,pager "s" "<save-message>?\r<enter>" "Save message in folder" # "r" would be more vim like, perhaps
macro index,pager "c" "<copy-message>?<enter>" "Copy message to folder" # "yy" would be more vim like, perhaps
#bind generic,index,pager d noop
bind index,pager e delete-message # like gmails archive
#bind index,pager dd delete-message
bind index,pager x delete-message # think "small delete" like delete character in vim
bind index,pager X undelete-message
#macro index y "[tag-pattern]~A[enter][tag-prefix-cond][clear-flag]N[untag-pattern]~T[enter]"
bind index,pager d delete-thread # think "big delete" like delete line in vim
bind index,pager D undelete-thread
macro index \Ce "<delete-pattern>~A<enter>" "delete all messages"
macro index \Ca "<tag-pattern>~A<enter>" "tag all messages"
bind index,pager E edit # full message content
bind index,pager f flag-message # gmail is "s"
bind index I toggle-new
#bind index U toggle-new
bind pager I mark-as-new
#bind pager U mark-as-new
bind generic,index t tag-entry # gmail uses "x" but we'll use vim-like "t"
bind pager t tag-message # gmail uses "x" but we'll use vim-like "t"
bind index T tag-thread # gmail uses "x" but we'll use vim-like "t"
bind index \CT tag-pattern # gmail uses "x" but we'll use vim-like "t"
# navigation/saving ---------------------------------------------------
bind index,pager w sync-mailbox # default is $, but this is more like vim 'write'
macro index,pager W "<sync-mailbox><shell-escape>mailrun<enter>" "Sync mailbox and offlineimap." #<shell-escape>
macro index,pager $ "<sync-mailbox><shell-escape>mailrun<enter>" "Sync mailbox and offlineimap." #<shell-escape>
bind index,pager ZZ quit # save changes to mailbox and quit
bind pager q exit # exit back to index
bind index qq exit # exit mutt without syncing changes
bind generic,pager,browser,attach,compose,pgp,smime,postpone,query <esc> exit
# editor can apparently only be aborted with control-g and this can't be
# effectively macro'd or rebound
# macro editor \Ce '^G'
# movement ------------------------------------------------------------
bind generic,index,pager J next-entry
bind generic,index,pager K previous-entry
bind generic,index j next-entry
bind generic,index k previous-entry
bind pager j next-line
bind pager k previous-line
bind index,pager l next-thread
bind index,pager h previous-thread
bind generic,index,pager J next-entry
bind generic,index,pager K previous-entry
bind index,pager \Cu next-new-then-unread # ctrl-j conflicts with the <return> bindings below so I use n/p cf http://dev.mutt.org/trac/ticket/3494
bind index,pager \Ch previous-new-then-unread
bind generic,index,pager \Cd half-down
bind generic,index,pager \Cu half-up
bind generic,index,pager \Cf next-page
bind generic,index,pager \Cb previous-page
bind index,pager { previous-thread
bind index,pager } next-thread
bind pager gg top
bind pager G bottom
bind index gg first-entry
bind index G last-entry
bind index H top-page
bind index M middle-page
bind index L bottom-page
bind pager H top
bind pager L bottom
bind pager <space> next-page
bind pager ] skip-quoted
#bind index,pager n next-undeleted
#bind index,pager p previous-undeleted
# message actions -----------------------------------------------------
bind index <return> display-message # like gmail
bind generic <return> select-entry # neither vim nor gmail like
bind pager <return> exit # neither vim nor gmail like, but good
macro index U |urlview\n
macro pager U |urlview\n
bind index,pager b bounce-message
bind index,pager f forward-message
bind index,pager r group-reply # to all recipients by default
bind index,pager R reply # to sender only
bind index,pager m mail # "c" would be more like gmail "compose" but using "c" for copy right now
# composition actions -------------------------------------------------
#bind editor <Tab> complete-query
#bind editor ^T complete
macro generic,index,pager <F7> "<enter-command>unset wait_key<enter><shell-escape>/usr/bin/mutt-notmuch --prompt search<enter><change-folder>~/.cache/mutt_results<enter>" "search mail (using notmuch)"
macro generic,index,pager <F8> "<enter-command>unset wait_key<enter><enter-command>unignore message-id<enter><pipe-message>/usr/bin/mutt-notmuch thread<enter><change-folder-readonly>~/.cache/mutt_results<enter><enter-command>set wait_key<enter>" "search and reconstruct owning thread (using notmuch)"
macro generic,index,pager <F6> "<enter-command>unset wait_key<enter><enter-command>unignore message-id<enter><enter-command>push <pipe-message>muttjump<enter><enter>" "jump to original message"
macro generic,index,pager <F5> "<enter-command>unset wait_key<enter><enter-command>unignore message-id<enter><pipe-message>/usr/bin/notmuch tag -new<enter><enter-command>set wait_key<enter>" "tag message (using notmuch)"
# other actions -------------------------------------------------------
bind generic,index,pager / search
bind generic,index,pager % shell-escape # mnemonic: zsh standard prompt
bind generic \Cl refresh # this is default and same as vim
bind index,pager @ display-address # defaul mutt