2 " Language: Mutt setup files
3 " Original: Preben 'Peppe' Guldberg <peppe-vim@wielders.org>
4 " Maintainer: Kyle Wheeler <kyle-muttrc.vim@memoryhole.net>
5 " Last Change: 12 Jun 2008
7 " This file covers mutt version 1.5.18 (and most of the mercurial tip)
8 " Included are also a few features from 1.4.2.1
10 " For version 5.x: Clear all syntax items
11 " For version 6.x: Quit when a syntax file was already loaded
14 elseif exists("b:current_syntax")
18 " Set the keyword characters
22 setlocal isk=@,48-57,_,-
25 syn match muttrcComment "^# .*$" contains=@Spell
26 syn match muttrcComment "^#[^ ].*$"
27 syn match muttrcComment "^#$"
28 syn match muttrcComment "[^\\]#.*$"lc=1
30 " Escape sequences (back-tick and pipe goes here too)
31 syn match muttrcEscape +\\[#tnr"'Cc ]+
32 syn match muttrcEscape +[`|]+
33 syn match muttrcEscape +\\$+
35 " The variables takes the following arguments
36 syn match muttrcString "=\s*[^ #"'`]\+"lc=1 contains=muttrcEscape
37 syn region muttrcString start=+"+ms=e skip=+\\"+ end=+"+ contains=muttrcEscape,muttrcSet,muttrcUnset,muttrcReset,muttrcToggle,muttrcCommand,muttrcAction,muttrcShellString
38 syn region muttrcString start=+'+ms=e skip=+\\'+ end=+'+ contains=muttrcEscape,muttrcSet,muttrcUnset,muttrcReset,muttrcToggle,muttrcCommand,muttrcAction
40 syn region muttrcShellString matchgroup=muttrcEscape keepend start=+`+ skip=+\\`+ end=+`+ contains=muttrcVarStr,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcCommand,muttrcSet
42 syn match muttrcRXChars contained /[^\\][][.*?+]\+/hs=s+1
43 syn match muttrcRXChars contained /[][|()][.*?+]*/
44 syn match muttrcRXChars contained /['"]^/ms=s+1
45 syn match muttrcRXChars contained /$['"]/me=e-1
46 syn match muttrcRXChars contained /\\/
47 " Why does muttrcRXString2 work with one \ when muttrcRXString requires two?
48 syn region muttrcRXString contained start=+'+ skip=+\\'+ end=+'+ contains=muttrcRXChars
49 syn region muttrcRXString contained start=+"+ skip=+\\"+ end=+"+ contains=muttrcRXChars
50 syn region muttrcRXString2 contained start=+'+ skip=+\'+ end=+'+ contains=muttrcRXChars
51 syn region muttrcRXString2 contained start=+"+ skip=+\"+ end=+"+ contains=muttrcRXChars
53 syn region muttrcRXPat contained start=+'+ skip=+\\'+ end=+'\s*+ keepend skipwhite contains=muttrcRXString nextgroup=muttrcRXPat
54 syn region muttrcRXPat contained start=+"+ skip=+\\"+ end=+"\s*+ keepend skipwhite contains=muttrcRXString nextgroup=muttrcRXPat
55 syn match muttrcRXPat contained /[^-'"#!]\S\+\%(\s\|$\)/ skipwhite contains=muttrcRXChars nextgroup=muttrcRXPat
56 syn match muttrcRXDef contained "-rx\s\+" skipwhite nextgroup=muttrcRXPat
58 syn match muttrcSpecial +\(['"]\)!\1+
60 " Numbers and Quadoptions may be surrounded by " or '
61 syn match muttrcNumber /=\s*\d\+/lc=1
62 syn match muttrcNumber /=\s*"\d\+"/lc=1
63 syn match muttrcNumber /=\s*'\d\+'/lc=1
64 syn match muttrcQuadopt +=\s*\%(ask-\)\=\%(yes\|no\)+lc=1
65 syn match muttrcQuadopt +=\s*"\%(ask-\)\=\%(yes\|no\)"+lc=1
66 syn match muttrcQuadopt +=\s*'\%(ask-\)\=\%(yes\|no\)'+lc=1
68 " Now catch some email addresses and headers (purified version from mail.vim)
69 syn match muttrcEmail "[a-zA-Z0-9._-]\+@[a-zA-Z0-9./-]\+"
70 syn match muttrcHeader "\<\%(From\|To\|C[Cc]\|B[Cc][Cc]\|Reply-To\|Subject\|Return-Path\|Received\|Date\|Replied\|Attach\)\>:\="
72 syn match muttrcKeySpecial contained +\%(\\[Cc'"]\|\^\|\\[01]\d\{2}\)+
73 syn match muttrcKey contained "\S\+" contains=muttrcKeySpecial,muttrcKeyName
74 syn region muttrcKey contained start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=muttrcKeySpecial,muttrcKeyName
75 syn region muttrcKey contained start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=muttrcKeySpecial,muttrcKeyName
76 syn match muttrcKeyName contained "\<f\%(\d\|10\)\>"
77 syn match muttrcKeyName contained "\\[trne]"
78 syn match muttrcKeyName contained "\c<\%(BackSpace\|Delete\|Down\|End\|Enter\|Esc\|Home\|Insert\|Left\|PageDown\|PageUp\|Return\|Right\|Space\|Tab\|Up\)>"
79 syn match muttrcKeyName contained "<F[0-9]\+>"
81 syn keyword muttrcVarBool contained allow_8bit allow_ansi arrow_cursor ascii_chars askbcc
82 syn keyword muttrcVarBool contained askcc attach_split auto_tag autoedit beep beep_new
83 syn keyword muttrcVarBool contained bounce_delivered braille_friendly check_new check_mbox_size collapse_unread
84 syn keyword muttrcVarBool contained confirmappend confirmcreate crypt_autoencrypt crypt_autopgp
85 syn keyword muttrcVarBool contained crypt_autosign crypt_autosmime crypt_replyencrypt
86 syn keyword muttrcVarBool contained crypt_replysign crypt_replysignencrypted crypt_timestamp
87 syn keyword muttrcVarBool contained crypt_use_gpgme crypt_use_pka delete_untag digest_collapse duplicate_threads
88 syn keyword muttrcVarBool contained edit_hdrs edit_headers encode_from envelope_from fast_reply
89 syn keyword muttrcVarBool contained fcc_attach fcc_clear followup_to force_name forw_decode
90 syn keyword muttrcVarBool contained forw_decrypt forw_quote forward_decode forward_decrypt
91 syn keyword muttrcVarBool contained forward_quote hdrs header help hidden_host hide_limited
92 syn keyword muttrcVarBool contained hide_missing hide_thread_subject hide_top_limited
93 syn keyword muttrcVarBool contained hide_top_missing ignore_linear_white_space ignore_list_reply_to imap_check_subscribed
94 syn keyword muttrcVarBool contained imap_list_subscribed imap_passive imap_peek imap_servernoise
95 syn keyword muttrcVarBool contained implicit_autoview include_onlyfirst keep_flagged
96 syn keyword muttrcVarBool contained mailcap_sanitize maildir_header_cache_verify maildir_trash
97 syn keyword muttrcVarBool contained mark_old markers menu_move_off menu_scroll message_cache_clean meta_key
98 syn keyword muttrcVarBool contained metoo mh_purge mime_forward_decode narrow_tree pager_stop
99 syn keyword muttrcVarBool contained pgp_auto_decode pgp_auto_traditional pgp_autoencrypt
100 syn keyword muttrcVarBool contained pgp_autoinline pgp_autosign pgp_check_exit
101 syn keyword muttrcVarBool contained pgp_create_traditional pgp_ignore_subkeys pgp_long_ids
102 syn keyword muttrcVarBool contained pgp_replyencrypt pgp_replyinline pgp_replysign
103 syn keyword muttrcVarBool contained pgp_replysignencrypted pgp_retainable_sigs pgp_show_unusable
104 syn keyword muttrcVarBool contained pgp_strict_enc pgp_use_gpg_agent pipe_decode pipe_split
105 syn keyword muttrcVarBool contained pop_auth_try_all pop_last print_decode print_split
106 syn keyword muttrcVarBool contained prompt_after read_only reply_self resolve reverse_alias
107 syn keyword muttrcVarBool contained reverse_name reverse_realname rfc2047_parameters save_address
108 syn keyword muttrcVarBool contained save_empty save_name score sig_dashes sig_on_top
109 syn keyword muttrcVarBool contained smart_wrap smime_ask_cert_label smime_decrypt_use_default_key
110 syn keyword muttrcVarBool contained smime_is_default sort_re ssl_force_tls ssl_use_sslv2
111 syn keyword muttrcVarBool contained ssl_use_sslv3 ssl_use_tlsv1 ssl_usesystemcerts status_on_top
112 syn keyword muttrcVarBool contained strict_mime strict_threads suspend text_flowed thorough_search
113 syn keyword muttrcVarBool contained thread_received tilde uncollapse_jump use_8bitmime
114 syn keyword muttrcVarBool contained use_domain use_envelope_from use_from use_idn use_ipv6
115 syn keyword muttrcVarBool contained user_agent wait_key weed wrap_search write_bcc
117 syn keyword muttrcVarBool contained noallow_8bit noallow_ansi noarrow_cursor noascii_chars noaskbcc
118 syn keyword muttrcVarBool contained noaskcc noattach_split noauto_tag noautoedit nobeep nobeep_new
119 syn keyword muttrcVarBool contained nobounce_delivered nobraille_friendly nocheck_new nocollapse_unread
120 syn keyword muttrcVarBool contained noconfirmappend noconfirmcreate nocrypt_autoencrypt nocrypt_autopgp
121 syn keyword muttrcVarBool contained nocrypt_autosign nocrypt_autosmime nocrypt_replyencrypt
122 syn keyword muttrcVarBool contained nocrypt_replysign nocrypt_replysignencrypted nocrypt_timestamp
123 syn keyword muttrcVarBool contained nocrypt_use_gpgme nodelete_untag nodigest_collapse noduplicate_threads
124 syn keyword muttrcVarBool contained noedit_hdrs noedit_headers noencode_from noenvelope_from nofast_reply
125 syn keyword muttrcVarBool contained nofcc_attach nofcc_clear nofollowup_to noforce_name noforw_decode
126 syn keyword muttrcVarBool contained noforw_decrypt noforw_quote noforward_decode noforward_decrypt
127 syn keyword muttrcVarBool contained noforward_quote nohdrs noheader nohelp nohidden_host nohide_limited
128 syn keyword muttrcVarBool contained nohide_missing nohide_thread_subject nohide_top_limited
129 syn keyword muttrcVarBool contained nohide_top_missing noignore_list_reply_to noimap_check_subscribed
130 syn keyword muttrcVarBool contained noimap_list_subscribed noimap_passive noimap_peek noimap_servernoise
131 syn keyword muttrcVarBool contained noimplicit_autoview noinclude_onlyfirst nokeep_flagged
132 syn keyword muttrcVarBool contained nomailcap_sanitize nomaildir_header_cache_verify nomaildir_trash
133 syn keyword muttrcVarBool contained nomark_old nomarkers nomenu_move_off nomenu_scroll nometa_key
134 syn keyword muttrcVarBool contained nometoo nomh_purge nomime_forward_decode nonarrow_tree nopager_stop
135 syn keyword muttrcVarBool contained nopgp_auto_decode nopgp_auto_traditional nopgp_autoencrypt
136 syn keyword muttrcVarBool contained nopgp_autoinline nopgp_autosign nopgp_check_exit
137 syn keyword muttrcVarBool contained nopgp_create_traditional nopgp_ignore_subkeys nopgp_long_ids
138 syn keyword muttrcVarBool contained nopgp_replyencrypt nopgp_replyinline nopgp_replysign
139 syn keyword muttrcVarBool contained nopgp_replysignencrypted nopgp_retainable_sigs nopgp_show_unusable
140 syn keyword muttrcVarBool contained nopgp_strict_enc nopgp_use_gpg_agent nopipe_decode nopipe_split
141 syn keyword muttrcVarBool contained nopop_auth_try_all nopop_last noprint_decode noprint_split
142 syn keyword muttrcVarBool contained noprompt_after noread_only noreply_self noresolve noreverse_alias
143 syn keyword muttrcVarBool contained noreverse_name noreverse_realname norfc2047_parameters nosave_address
144 syn keyword muttrcVarBool contained nosave_empty nosave_name noscore nosig_dashes nosig_on_top
145 syn keyword muttrcVarBool contained nosmart_wrap nosmime_ask_cert_label nosmime_decrypt_use_default_key
146 syn keyword muttrcVarBool contained nosmime_is_default nosort_re nossl_force_tls nossl_use_sslv2
147 syn keyword muttrcVarBool contained nossl_use_sslv3 nossl_use_tlsv1 nossl_usesystemcerts nostatus_on_top
148 syn keyword muttrcVarBool contained nostrict_threads nosuspend notext_flowed nothorough_search
149 syn keyword muttrcVarBool contained nothread_received notilde nouncollapse_jump nouse_8bitmime
150 syn keyword muttrcVarBool contained nouse_domain nouse_envelope_from nouse_from nouse_idn nouse_ipv6
151 syn keyword muttrcVarBool contained nouser_agent nowait_key noweed nowrap_search nowrite_bcc
153 syn keyword muttrcVarBool contained invallow_8bit invallow_ansi invarrow_cursor invascii_chars invaskbcc
154 syn keyword muttrcVarBool contained invaskcc invattach_split invauto_tag invautoedit invbeep invbeep_new
155 syn keyword muttrcVarBool contained invbounce_delivered invbraille_friendly invcheck_new invcollapse_unread
156 syn keyword muttrcVarBool contained invconfirmappend invconfirmcreate invcrypt_autoencrypt invcrypt_autopgp
157 syn keyword muttrcVarBool contained invcrypt_autosign invcrypt_autosmime invcrypt_replyencrypt
158 syn keyword muttrcVarBool contained invcrypt_replysign invcrypt_replysignencrypted invcrypt_timestamp
159 syn keyword muttrcVarBool contained invcrypt_use_gpgme invdelete_untag invdigest_collapse invduplicate_threads
160 syn keyword muttrcVarBool contained invedit_hdrs invedit_headers invencode_from invenvelope_from invfast_reply
161 syn keyword muttrcVarBool contained invfcc_attach invfcc_clear invfollowup_to invforce_name invforw_decode
162 syn keyword muttrcVarBool contained invforw_decrypt invforw_quote invforward_decode invforward_decrypt
163 syn keyword muttrcVarBool contained invforward_quote invhdrs invheader invhelp invhidden_host invhide_limited
164 syn keyword muttrcVarBool contained invhide_missing invhide_thread_subject invhide_top_limited
165 syn keyword muttrcVarBool contained invhide_top_missing invignore_list_reply_to invimap_check_subscribed
166 syn keyword muttrcVarBool contained invimap_list_subscribed invimap_passive invimap_peek invimap_servernoise
167 syn keyword muttrcVarBool contained invimplicit_autoview invinclude_onlyfirst invkeep_flagged
168 syn keyword muttrcVarBool contained invmailcap_sanitize invmaildir_header_cache_verify invmaildir_trash
169 syn keyword muttrcVarBool contained invmark_old invmarkers invmenu_move_off invmenu_scroll invmeta_key
170 syn keyword muttrcVarBool contained invmetoo invmh_purge invmime_forward_decode invnarrow_tree invpager_stop
171 syn keyword muttrcVarBool contained invpgp_auto_decode invpgp_auto_traditional invpgp_autoencrypt
172 syn keyword muttrcVarBool contained invpgp_autoinline invpgp_autosign invpgp_check_exit
173 syn keyword muttrcVarBool contained invpgp_create_traditional invpgp_ignore_subkeys invpgp_long_ids
174 syn keyword muttrcVarBool contained invpgp_replyencrypt invpgp_replyinline invpgp_replysign
175 syn keyword muttrcVarBool contained invpgp_replysignencrypted invpgp_retainable_sigs invpgp_show_unusable
176 syn keyword muttrcVarBool contained invpgp_strict_enc invpgp_use_gpg_agent invpipe_decode invpipe_split
177 syn keyword muttrcVarBool contained invpop_auth_try_all invpop_last invprint_decode invprint_split
178 syn keyword muttrcVarBool contained invprompt_after invread_only invreply_self invresolve invreverse_alias
179 syn keyword muttrcVarBool contained invreverse_name invreverse_realname invrfc2047_parameters invsave_address
180 syn keyword muttrcVarBool contained invsave_empty invsave_name invscore invsig_dashes invsig_on_top
181 syn keyword muttrcVarBool contained invsmart_wrap invsmime_ask_cert_label invsmime_decrypt_use_default_key
182 syn keyword muttrcVarBool contained invsmime_is_default invsort_re invssl_force_tls invssl_use_sslv2
183 syn keyword muttrcVarBool contained invssl_use_sslv3 invssl_use_tlsv1 invssl_usesystemcerts invstatus_on_top
184 syn keyword muttrcVarBool contained invstrict_threads invsuspend invtext_flowed invthorough_search
185 syn keyword muttrcVarBool contained invthread_received invtilde invuncollapse_jump invuse_8bitmime
186 syn keyword muttrcVarBool contained invuse_domain invuse_envelope_from invuse_from invuse_idn invuse_ipv6
187 syn keyword muttrcVarBool contained invuser_agent invwait_key invweed invwrap_search invwrite_bcc
189 syn keyword muttrcVarQuad contained abort_nosubject abort_unmodified bounce copy
190 syn keyword muttrcVarQuad contained crypt_verify_sig delete forward_edit honor_followup_to
191 syn keyword muttrcVarQuad contained include mime_forward mime_forward_rest mime_fwd move
192 syn keyword muttrcVarQuad contained pgp_mime_auto pgp_verify_sig pop_delete pop_reconnect
193 syn keyword muttrcVarQuad contained postpone print quit recall reply_to ssl_starttls
195 syn keyword muttrcVarQuad contained noabort_nosubject noabort_unmodified nobounce nocopy
196 syn keyword muttrcVarQuad contained nocrypt_verify_sig nodelete noforward_edit nohonor_followup_to
197 syn keyword muttrcVarQuad contained noinclude nomime_forward nomime_forward_rest nomime_fwd nomove
198 syn keyword muttrcVarQuad contained nopgp_mime_auto nopgp_verify_sig nopop_delete nopop_reconnect
199 syn keyword muttrcVarQuad contained nopostpone noprint noquit norecall noreply_to nossl_starttls
201 syn keyword muttrcVarQuad contained invabort_nosubject invabort_unmodified invbounce invcopy
202 syn keyword muttrcVarQuad contained invcrypt_verify_sig invdelete invforward_edit invhonor_followup_to
203 syn keyword muttrcVarQuad contained invinclude invmime_forward invmime_forward_rest invmime_fwd invmove
204 syn keyword muttrcVarQuad contained invpgp_mime_auto invpgp_verify_sig invpop_delete invpop_reconnect
205 syn keyword muttrcVarQuad contained invpostpone invprint invquit invrecall invreply_to invssl_starttls
207 syn keyword muttrcVarNum contained connect_timeout history imap_keepalive mail_check menu_context net_inc
208 syn keyword muttrcVarNum contained pager_context pager_index_lines pgp_timeout pop_checkinterval read_inc
209 syn keyword muttrcVarNum contained save_history score_threshold_delete score_threshold_flag
210 syn keyword muttrcVarNum contained score_threshold_read sendmail_wait sleep_time smime_timeout
211 syn keyword muttrcVarNum contained ssl_min_dh_prime_bits timeout time_inc wrap wrapmargin write_inc
213 syn match muttrcStrftimeEscapes contained /%[AaBbCcDdeFGgHhIjklMmnpRrSsTtUuVvWwXxYyZz+%]/
214 syn match muttrcStrftimeEscapes contained /%E[cCxXyY]/
215 syn match muttrcStrftimeEscapes contained /%O[BdeHImMSuUVwWy]/
217 syn match muttrcFormatErrors contained /%./
219 syn region muttrcIndexFormatStr contained keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcIndexFormatEscapes,muttrcIndexFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes
220 syn region muttrcIndexFormatStr contained keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcIndexFormatEscapes,muttrcIndexFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes
221 syn region muttrcQueryFormatStr contained keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcQueryFormatEscapes,muttrcQueryFormatConditionals,muttrcFormatErrors
222 syn region muttrcAliasFormatStr contained keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcAliasFormatEscapes,muttrcFormatErrors
223 syn region muttrcAliasFormatStr contained keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcAliasFormatEscapes,muttrcFormatErrors
224 syn region muttrcAttachFormatStr contained keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcAttachFormatEscapes,muttrcAttachFormatConditionals,muttrcFormatErrors
225 syn region muttrcAttachFormatStr contained keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcAttachFormatEscapes,muttrcAttachFormatConditionals,muttrcFormatErrors
226 syn region muttrcComposeFormatStr contained keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcComposeFormatEscapes,muttrcFormatErrors
227 syn region muttrcComposeFormatStr contained keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcComposeFormatEscapes,muttrcFormatErrors
228 syn region muttrcFolderFormatStr contained keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcFolderFormatEscapes,muttrcFolderFormatConditionals,muttrcFormatErrors
229 syn region muttrcFolderFormatStr contained keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcFolderFormatEscapes,muttrcFolderFormatConditionals,muttrcFormatErrors
230 syn region muttrcMixFormatStr contained keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcMixFormatEscapes,muttrcMixFormatConditionals,muttrcFormatErrors
231 syn region muttrcMixFormatStr contained keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcMixFormatEscapes,muttrcMixFormatConditionals,muttrcFormatErrors
232 syn region muttrcPGPFormatStr contained keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPGPFormatEscapes,muttrcPGPFormatConditionals,muttrcFormatErrors,muttrcPGPTimeEscapes
233 syn region muttrcPGPFormatStr contained keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPGPFormatEscapes,muttrcPGPFormatConditionals,muttrcFormatErrors,muttrcPGPTimeEscapes
234 syn region muttrcPGPCmdFormatStr contained keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPGPCmdFormatEscapes,muttrcPGPCmdFormatConditionals,muttrcVariable,muttrcFormatErrors
235 syn region muttrcPGPCmdFormatStr contained keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPGPCmdFormatEscapes,muttrcPGPCmdFormatConditionals,muttrcVariable,muttrcFormatErrors
236 syn region muttrcStatusFormatStr contained keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcStatusFormatEscapes,muttrcStatusFormatConditionals,muttrcFormatErrors
237 syn region muttrcStatusFormatStr contained keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcStatusFormatEscapes,muttrcStatusFormatConditionals,muttrcFormatErrors
238 syn region muttrcPGPGetKeysFormatStr contained keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPGPGetKeysFormatEscapes,muttrcFormatErrors
239 syn region muttrcPGPGetKeysFormatStr contained keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPGPGetKeysFormatEscapes,muttrcFormatErrors
240 syn region muttrcSmimeFormatStr contained keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcSmimeFormatEscapes,muttrcSmimeFormatConditionals,muttrcVariable,muttrcFormatErrors
241 syn region muttrcSmimeFormatStr contained keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcSmimeFormatEscapes,muttrcSmimeFormatConditionals,muttrcVariable,muttrcFormatErrors
243 " The following info was pulled from hdr_format_str in hdrline.c
244 syn match muttrcIndexFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[aAbBcCdDeEfFHilLmMnNOPsStTuvXyYZ%]/
245 syn match muttrcIndexFormatConditionals contained /%?[EFHlLMNOXyY]?/ nextgroup=muttrcFormatConditionals2
246 " The following info was pulled from alias_format_str in addrbook.c
247 syn match muttrcAliasFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[afnrt%]/
248 " The following info was pulled from query_format_str in query.c
249 syn match muttrcQueryFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[acent%]/
250 syn match muttrcQueryFormatConditionals contained /%?[e]?/ nextgroup=muttrcFormatConditionals2
251 " The following info was pulled from mutt_attach_fmt in recvattach.c
252 syn match muttrcAttachFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[CcDdefImMnQstTuX%]/
253 syn match muttrcAttachFormatEscapes contained /%[>|*]./
254 syn match muttrcAttachFormatConditionals contained /%?[CcdDefInmMQstTuX]?/ nextgroup=muttrcFormatConditionals2
255 syn match muttrcFormatConditionals2 contained /[^?]*?/
256 " The following info was pulled from compose_format_str in compose.c
257 syn match muttrcComposeFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[ahlv%]/
258 syn match muttrcComposeFormatEscapes contained /%[>|*]./
259 " The following info was pulled from folder_format_str in browser.c
260 syn match muttrcFolderFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[CdfFglNstu%]/
261 syn match muttrcFolderFormatEscapes contained /%[>|*]./
262 syn match muttrcFolderFormatConditionals contained /%?[N]?/
263 " The following info was pulled from mix_entry_fmt in remailer.c
264 syn match muttrcMixFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[ncsa%]/
265 syn match muttrcMixFormatConditionals contained /%?[ncsa]?/
266 " The following info was pulled from crypt_entry_fmt in crypt-gpgme.c
267 " and pgp_entry_fmt in pgpkey.c (note that crypt_entry_fmt supports
268 " 'p', but pgp_entry_fmt does not).
269 syn match muttrcPGPFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[nkualfctp%]/
270 syn match muttrcPGPFormatConditionals contained /%?[nkualfct]?/
271 " The following info was pulled from _mutt_fmt_pgp_command in
273 syn match muttrcPGPCmdFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[pfsar%]/
274 syn match muttrcPGPCmdFormatConditionals contained /%?[pfsar]?/ nextgroup=muttrcFormatConditionals2
275 " The following info was pulled from status_format_str in status.c
276 syn match muttrcStatusFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[bdfFhlLmMnopPrsStuvV%]/
277 syn match muttrcStatusFormatEscapes contained /%[>|*]./
278 syn match muttrcStatusFormatConditionals contained /%?[bdFlLmMnoptuV]?/ nextgroup=muttrcFormatConditionals2
279 " This matches the documentation, but directly contradicts the code
280 " (according to the code, this should be identical to the
281 " muttrcPGPCmdFormatEscapes
282 syn match muttrcPGPGetKeysFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[r%]/
283 " The following info was pulled from _mutt_fmt_smime_command in
285 syn match muttrcSmimeFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[Cciskaf%]/
286 syn match muttrcSmimeFormatConditionals contained /%?[Cciskaf]?/ nextgroup=muttrcFormatConditionals2
288 syn region muttrcTimeEscapes contained start=+%{+ end=+}+ contains=muttrcStrftimeEscapes
289 syn region muttrcTimeEscapes contained start=+%\[+ end=+\]+ contains=muttrcStrftimeEscapes
290 syn region muttrcTimeEscapes contained start=+%(+ end=+)+ contains=muttrcStrftimeEscapes
291 syn region muttrcTimeEscapes contained start=+%<+ end=+>+ contains=muttrcStrftimeEscapes
292 syn region muttrcPGPTimeEscapes contained start=+%\[+ end=+\]+ contains=muttrcStrftimeEscapes
294 syn keyword muttrcVarStr contained attribution index_format message_format pager_format nextgroup=muttrcVarEqualsIdxFmt
295 syn match muttrcVarEqualsIdxFmt contained " *= *" nextgroup=muttrcIndexFormatStr
296 syn keyword muttrcVarStr contained alias_format nextgroup=muttrcVarEqualsAliasFmt
297 syn match muttrcVarEqualsAliasFmt contained " *= *" nextgroup=muttrcAliasFormatStr
298 syn keyword muttrcVarStr contained attach_format nextgroup=muttrcVarEqualsAttachFmt
299 syn match muttrcVarEqualsAttachFmt contained " *= *" nextgroup=muttrcAttachFormatStr
300 syn keyword muttrcVarStr contained compose_format nextgroup=muttrcVarEqualsComposeFmt
301 syn match muttrcVarEqualsComposeFmt contained " *= *" nextgroup=muttrcComposeFormatStr
302 syn keyword muttrcVarStr contained folder_format nextgroup=muttrcVarEqualsFolderFmt
303 syn match muttrcVarEqualsFolderFmt contained " *= *" nextgroup=muttrcFolderFormatStr
304 syn keyword muttrcVarStr contained mix_entry_format nextgroup=muttrcVarEqualsMixFmt
305 syn match muttrcVarEqualsMixFmt contained " *= *" nextgroup=muttrcMixFormatStr
306 syn keyword muttrcVarStr contained pgp_entry_format nextgroup=muttrcVarEqualsPGPFmt
307 syn match muttrcVarEqualsPGPFmt contained " *= *" nextgroup=muttrcPGPFormatStr
308 syn keyword muttrcVarStr contained query_format nextgroup=muttrcVarEqualsQueryFmt
309 syn match muttrcVarEqualsQueryFmt contained " *= *" nextgroup=muttrcQueryFormatStr
310 syn keyword muttrcVarStr contained pgp_decode_command pgp_verify_command pgp_decrypt_command pgp_clearsign_command pgp_sign_command pgp_encrypt_sign_command pgp_encrypt_only_command pgp_import_command pgp_export_command pgp_verify_key_command pgp_list_secring_command pgp_list_pubring_command nextgroup=muttrcVarEqualsPGPCmdFmt
311 syn match muttrcVarEqualsPGPCmdFmt contained " *= *" nextgroup=muttrcPGPCmdFormatStr
312 syn keyword muttrcVarStr contained status_format nextgroup=muttrcVarEqualsStatusFmt
313 syn match muttrcVarEqualsStatusFmt contained " *= *" nextgroup=muttrcStatusFormatStr
314 syn keyword muttrcVarStr contained pgp_getkeys_command nextgroup=muttrcVarEqualsPGPGetKeysFmt
315 syn match muttrcVarEqualsPGPGetKeysFmt contained " *= *" nextgroup=muttrcPGPGetKeysFormatStr
316 syn keyword muttrcVarStr contained smime_decrypt_command smime_verify_command smime_verify_opaque_command smime_sign_command smime_sign_opaque_command smime_encrypt_command smime_pk7out_command smime_get_cert_command smime_get_signer_cert_command smime_import_cert_command smime_get_cert_email_command nextgroup=muttrcVarEqualsSmimeFmt
317 syn match muttrcVarEqualsSmimeFmt contained " *= *" nextgroup=muttrcSmimeFormatStr
319 syn match muttrcVarStr contained 'my_[a-zA-Z0-9_]\+'
320 syn keyword muttrcVarStr contained alias_file assumed_charset attach_charset attach_sep
321 syn keyword muttrcVarStr contained certificate_file charset config_charset content_type
322 syn keyword muttrcVarStr contained date_format default_hook display_filter dotlock_program dsn_notify
323 syn keyword muttrcVarStr contained dsn_return editor entropy_file envelope_from_address escape folder
324 syn keyword muttrcVarStr contained forw_format forward_format from gecos_mask hdr_format
325 syn keyword muttrcVarStr contained header_cache header_cache_pagesize history_file hostname imap_authenticators
326 syn keyword muttrcVarStr contained imap_delim_chars imap_headers imap_idle imap_login imap_pass
327 syn keyword muttrcVarStr contained imap_user indent_str indent_string ispell locale mailcap_path
328 syn keyword muttrcVarStr contained mask mbox mbox_type message_cachedir mh_seq_flagged mh_seq_replied
329 syn keyword muttrcVarStr contained mh_seq_unseen mixmaster msg_format pager
330 syn keyword muttrcVarStr contained pgp_good_sign
331 syn keyword muttrcVarStr contained pgp_mime_signature_filename
332 syn keyword muttrcVarStr contained pgp_mime_signature_description pgp_sign_as
333 syn keyword muttrcVarStr contained pgp_sort_keys
334 syn keyword muttrcVarStr contained pipe_sep pop_authenticators pop_host pop_pass pop_user post_indent_str
335 syn keyword muttrcVarStr contained post_indent_string postponed preconnect print_cmd print_command
336 syn keyword muttrcVarStr contained query_command quote_regexp realname record reply_regexp send_charset
337 syn keyword muttrcVarStr contained sendmail shell signature simple_search smileys smime_ca_location
338 syn keyword muttrcVarStr contained smime_certificates smime_default_key
339 syn keyword muttrcVarStr contained smime_encrypt_with
340 syn keyword muttrcVarStr contained smime_keys smime_sign_as
341 syn keyword muttrcVarStr contained smtp_url smtp_authenticators smtp_pass sort sort_alias sort_aux
342 syn keyword muttrcVarStr contained sort_browser spam_separator spoolfile ssl_ca_certificates_file ssl_client_cert
343 syn keyword muttrcVarStr contained status_chars tmpdir to_chars tunnel visual
345 " Present in 1.4.2.1 (pgp_create_traditional was a bool then)
346 syn keyword muttrcVarBool contained imap_force_ssl imap_force_ssl noinvimap_force_ssl
347 "syn keyword muttrcVarQuad contained pgp_create_traditional nopgp_create_traditional invpgp_create_traditional
348 syn keyword muttrcVarStr contained alternates
350 syn keyword muttrcMenu contained alias attach browser compose editor index pager postpone pgp mix query generic
351 syn match muttrcMenuList "\S\+" contained contains=muttrcMenu
352 syn match muttrcMenuCommas /,/ contained
354 syn keyword muttrcCommand auto_view alternative_order charset-hook exec unalternative_order
355 syn keyword muttrcCommand hdr_order iconv-hook ignore mailboxes my_hdr unmailboxes
356 syn keyword muttrcCommand pgp-hook push score source unauto_view unhdr_order
357 syn keyword muttrcCommand unignore unmono unmy_hdr unscore
358 syn keyword muttrcCommand mime_lookup unmime_lookup spam ungroup
359 syn keyword muttrcCommand nospam unalternative_order
361 syn keyword muttrcHooks contained account-hook charset-hook iconv-hook message-hook folder-hook mbox-hook save-hook fcc-hook fcc-save-hook send-hook send2-hook reply-hook crypt-hook
362 syn keyword muttrcUnhook contained unhook
363 syn region muttrcUnhookLine keepend start=+^\s*unhook\s+ skip=+\\$+ end=+$+ contains=muttrcUnhook,muttrcHooks,muttrcUnHighlightSpace,muttrcComment
365 syn match muttrcAttachmentsMimeType contained "[*a-z0-9_-]\+/[*a-z0-9._-]\+\s*" skipwhite nextgroup=muttrcAttachmentsMimeType
366 syn match muttrcAttachmentsFlag contained "[+-]\%([AI]\|inline\|attachment\)\s\+" skipwhite nextgroup=muttrcAttachmentsMimeType
367 syn match muttrcAttachmentsLine "^\s*\%(un\)\?attachments\s\+" skipwhite nextgroup=muttrcAttachmentsFlag
369 syn match muttrcUnHighlightSpace contained "\%(\s\+\|\\$\)"
371 syn keyword muttrcListsKeyword contained lists unlists
372 syn region muttrcListsLine keepend start=+^\s*\%(un\)\?lists\s+ skip=+\\$+ end=+$+ contains=muttrcListsKeyword,muttrcRXPat,muttrcGroupDef,muttrcUnHighlightSpace,muttrcComment
374 syn keyword muttrcSubscribeKeyword contained subscribe unsubscribe
375 syn region muttrcSubscribeLine keepend start=+^\s*\%(un\)\?subscribe\s+ skip=+\\$+ end=+$+ contains=muttrcSubscribeKeyword,muttrcRXPat,muttrcGroupDef,muttrcUnHighlightSpace,muttrcComment
377 syn keyword muttrcAlternateKeyword contained alternates unalternates
378 syn region muttrcAlternatesLine keepend start=+^\s*\%(un\)\?alternates\s+ skip=+\\$+ end=+$+ contains=muttrcAlternateKeyword,muttrcGroupDef,muttrcRXPat,muttrcUnHighlightSpace,muttrcComment
380 syn match muttrcVariable "\$[a-zA-Z_-]\+"
382 syn match muttrcBadAction contained "[^<>]\+" contains=muttrcEmail
383 syn match muttrcFunction contained "\<\%(attach\|bounce\|copy\|delete\|display\|flag\|forward\|parent\|pipe\|postpone\|print\|recall\|resend\|save\|send\|tag\|undelete\)-message\>"
384 syn match muttrcFunction contained "\<\%(delete\|next\|previous\|read\|tag\|undelete\)-thread\>"
385 syn match muttrcFunction contained "\<\%(backward\|capitalize\|downcase\|forward\|kill\|upcase\)-word\>"
386 syn match muttrcFunction contained "\<\%(delete\|filter\|first\|last\|next\|pipe\|previous\|print\|save\|select\|tag\|undelete\)-entry\>"
387 syn match muttrcFunction contained "\<attach-\%(file\|key\)\>"
388 syn match muttrcFunction contained "\<change-\%(dir\|folder\|folder-readonly\)\>"
389 syn match muttrcFunction contained "\<check-\%(new\|traditional-pgp\)\>"
390 syn match muttrcFunction contained "\<current-\%(bottom\|middle\|top\)\>"
391 syn match muttrcFunction contained "\<decode-\%(copy\|save\)\>"
392 syn match muttrcFunction contained "\<delete-\%(char\|pattern\|subthread\)\>"
393 syn match muttrcFunction contained "\<display-\%(address\|toggle-weed\)\>"
394 syn match muttrcFunction contained "\<edit\%(-\%(bcc\|cc\|description\|encoding\|fcc\|file\|from\|headers\|mime\|reply-to\|subject\|to\|type\)\)\?\>"
395 syn match muttrcFunction contained "\<enter-\%(command\|mask\)\>"
396 syn match muttrcFunction contained "\<half-\%(up\|down\)\>"
397 syn match muttrcFunction contained "\<history-\%(up\|down\)\>"
398 syn match muttrcFunction contained "\<kill-\%(eol\|eow\|line\)\>"
399 syn match muttrcFunction contained "\<next-\%(line\|new\|page\|subthread\|undeleted\|unread\|unread-mailbox\)\>"
400 syn match muttrcFunction contained "\<previous-\%(line\|new\|page\|subthread\|undeleted\|unread\)\>"
401 syn match muttrcFunction contained "\<search\%(-\%(next\|opposite\|reverse\|toggle\)\)\?\>"
402 syn match muttrcFunction contained "\<show-\%(limit\|version\)\>"
403 syn match muttrcFunction contained "\<sort-\%(mailbox\|reverse\)\>"
404 syn match muttrcFunction contained "\<tag-\%(pattern\|prefix\%(-cond\)\?\)\>"
405 syn match muttrcFunction contained "\<toggle-\%(mailboxes\|new\|quoted\|subscribed\|unlink\|write\)\>"
406 syn match muttrcFunction contained "\<undelete-\%(pattern\|subthread\)\>"
407 syn match muttrcFunction contained "\<collapse-\%(parts\|thread\|all\)\>"
408 syn match muttrcFunction contained "\<view-\%(attach\|attachments\|file\|mailcap\|name\|text\)\>"
409 syn match muttrcFunction contained "\<\%(backspace\|backward-char\|bol\|bottom\|bottom-page\|buffy-cycle\|clear-flag\|complete\%(-query\)\?\|copy-file\|create-alias\|detach-file\|eol\|exit\|extract-keys\|\%(imap-\)\?fetch-mail\|forget-passphrase\|forward-char\|group-reply\|help\|ispell\|jump\|limit\|list-reply\|mail\|mail-key\|mark-as-new\|middle-page\|new-mime\|noop\|pgp-menu\|query\|query-append\|quit\|quote-char\|read-subthread\|redraw-screen\|refresh\|rename-file\|reply\|select-new\|set-flag\|shell-escape\|skip-quoted\|sort\|subscribe\|sync-mailbox\|top\|top-page\|transpose-chars\|unsubscribe\|untag-pattern\|verify-key\|what-key\|write-fcc\)\>"
410 syn match muttrcAction contained "<[^>]\{-}>" contains=muttrcBadAction,muttrcFunction,muttrcKeyName
412 syn keyword muttrcSet set skipwhite nextgroup=muttrcVar.*
413 syn keyword muttrcUnset unset skipwhite nextgroup=muttrcVar.*
414 syn keyword muttrcReset reset skipwhite nextgroup=muttrcVar.*
415 syn keyword muttrcToggle toggle skipwhite nextgroup=muttrcVar.*
417 " First, functions that take regular expressions:
418 syn match muttrcRXHookNot contained /!\s*/ skipwhite nextgroup=muttrcRXString
419 syn match muttrcRXHooks /^\s*\%(account\|folder\)-hook\s\+/ skipwhite nextgroup=muttrcRXHookNot,muttrcRXString
421 " Now, functions that take patterns
422 syn match muttrcPatHookNot contained /!\s*/ skipwhite nextgroup=muttrcPattern
423 syn match muttrcPatHooks /^\s*\%(message\|mbox\|save\|fcc\%(-save\)\?\|send2\?\|reply\|crypt\)-hook\s\+/ nextgroup=muttrcPatHookNot,muttrcPattern
425 syn match muttrcBindFunction contained /\S\+\%(\s\|$\)/ skipwhite contains=muttrcFunction
426 syn match muttrcBindFunctionNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcBindFunction,muttrcBindFunctionNL
427 syn match muttrcBindKey contained /\S\+/ skipwhite contains=muttrcKey nextgroup=muttrcBindFunction,muttrcBindFunctionNL
428 syn match muttrcBindKeyNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcBindKey,muttrcBindKeyNL
429 syn match muttrcBindMenuList contained /\S\+/ skipwhite contains=muttrcMenu,muttrcMenuCommas nextgroup=muttrcBindKey,muttrcBindKeyNL
430 syn match muttrcBindMenuListNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcBindMenuList,muttrcBindMenuListNL
431 syn match muttrcBind /^\s*bind\s\?/ skipwhite nextgroup=muttrcBindMenuList,muttrcBindMenuListNL
433 syn region muttrcMacroDescr contained keepend skipwhite start=+\s*\S+ms=e skip=+\\ + end=+ \|$+me=s
434 syn region muttrcMacroDescr contained keepend skipwhite start=+'+ms=e skip=+\\'+ end=+'+me=s
435 syn region muttrcMacroDescr contained keepend skipwhite start=+"+ms=e skip=+\\"+ end=+"+me=s
436 syn match muttrcMacroDescrNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcMacroDescr,muttrcMacroDescrNL
437 syn region muttrcMacroBody contained skipwhite start="\S" skip='\\ \|\\$' end=' \|$' contains=muttrcEscape,muttrcSet,muttrcUnset,muttrcReset,muttrcToggle,muttrcCommand,muttrcAction nextgroup=muttrcMacroDescr,muttrcMacroDescrNL
438 syn region muttrcMacroBody matchgroup=Type contained skipwhite start=+'+ms=e skip=+\\'\|\\$+ end=+'\|$+me=s contains=muttrcEscape,muttrcSet,muttrcUnset,muttrcReset,muttrcToggle,muttrcCommand,muttrcAction nextgroup=muttrcMacroDescr,muttrcMacroDescrNL
439 syn region muttrcMacroBody matchgroup=Type contained skipwhite start=+"+ms=e skip=+\\"\|\\$+ end=+"\|$+me=s contains=muttrcEscape,muttrcSet,muttrcUnset,muttrcReset,muttrcToggle,muttrcCommand,muttrcAction nextgroup=muttrcMacroDescr,muttrcMacroDescrNL
440 syn match muttrcMacroBodyNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcMacroBody,muttrcMacroBodyNL
441 syn match muttrcMacroKey contained /\S\+/ skipwhite contains=muttrcKey nextgroup=muttrcMacroBody,muttrcMacroBodyNL
442 syn match muttrcMacroKeyNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcMacroKey,muttrcMacroKeyNL
443 syn match muttrcMacroMenuList contained /\S\+/ skipwhite contains=muttrcMenu,muttrcMenuCommas nextgroup=muttrcMacroKey,muttrcMacroKeyNL
444 syn match muttrcMacroMenuListNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcMacroMenuList,muttrcMacroMenuListNL
445 syn match muttrcMacro /^\s*macro\s\?/ skipwhite nextgroup=muttrcMacroMenuList,muttrcMacroMenuListNL
447 syn match muttrcAddrContent contained "[a-zA-Z0-9._-]\+@[a-zA-Z0-9./-]\+\s*" skipwhite contains=muttrcEmail nextgroup=muttrcAddrContent
448 syn region muttrcAddrContent contained start=+'+ end=+'\s*+ skip=+\\'+ skipwhite contains=muttrcEmail nextgroup=muttrcAddrContent
449 syn region muttrcAddrContent contained start=+"+ end=+"\s*+ skip=+\\"+ skipwhite contains=muttrcEmail nextgroup=muttrcAddrContent
450 syn match muttrcAddrDef contained "-addr\s\+" skipwhite nextgroup=muttrcAddrContent
452 syn match muttrcGroupFlag contained "-group"
453 syn region muttrcGroupDef contained start="-group\s\+" skip="\\$" end="\s" skipwhite keepend contains=muttrcGroupFlag,muttrcUnHighlightSpace
455 syn keyword muttrcGroupKeyword contained group ungroup
456 syn region muttrcGroupLine keepend start=+^\s*\%(un\)\?group\s+ skip=+\\$+ end=+$+ contains=muttrcGroupKeyword,muttrcGroupDef,muttrcAddrDef,muttrcRXDef,muttrcUnHighlightSpace,muttrcComment
458 syn match muttrcAliasGroupName contained /\w\+/ skipwhite nextgroup=muttrcAliasGroupDef,muttrcAliasKey,muttrcAliasNL
459 syn match muttrcAliasGroupDefNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasGroupName,muttrcAliasGroupDefNL
460 syn match muttrcAliasGroupDef contained /\s*-group/ skipwhite nextgroup=muttrcAliasGroupName,muttrcAliasGroupDefNL contains=muttrcGroupFlag
461 syn match muttrcAliasComma contained /,/ skipwhite nextgroup=muttrcAliasEmail,muttrcAliasEncEmail,muttrcAliasNameNoParens,muttrcAliasENNL
462 syn match muttrcAliasEmail contained /\S\+@\S\+/ contains=muttrcEmail nextgroup=muttrcAliasName,muttrcAliasNameNL skipwhite
463 syn match muttrcAliasEncEmail contained /<[^>]\+>/ contains=muttrcEmail nextgroup=muttrcAliasComma
464 syn match muttrcAliasEncEmailNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasEncEmail,muttrcAliasEncEmailNL
465 syn match muttrcAliasNameNoParens contained /[^<(@]\+\s\+/ nextgroup=muttrcAliasEncEmail,muttrcAliasEncEmailNL
466 syn region muttrcAliasName contained matchgroup=Type start=/(/ end=/)/ skipwhite
467 syn match muttrcAliasNameNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasName,muttrcAliasNameNL
468 syn match muttrcAliasENNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasEmail,muttrcAliasEncEmail,muttrcAliasNameNoParens,muttrcAliasENNL
469 syn match muttrcAliasKey contained /\s*[^- \t]\S\+/ skipwhite nextgroup=muttrcAliasEmail,muttrcAliasEncEmail,muttrcAliasNameNoParens,muttrcAliasENNL
470 syn match muttrcAliasNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasGroupDef,muttrcAliasKey,muttrcAliasNL
471 syn match muttrcAlias /^\s*alias\s/ skipwhite nextgroup=muttrcAliasGroupDef,muttrcAliasKey,muttrcAliasNL
473 syn match muttrcUnAliasKey contained "\s*\w\+\s*" skipwhite nextgroup=muttrcUnAliasKey,muttrcUnAliasNL
474 syn match muttrcUnAliasNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcUnAliasKey,muttrcUnAliasNL
475 syn match muttrcUnAlias /^\s*unalias\s\?/ nextgroup=muttrcUnAliasKey,muttrcUnAliasNL
477 syn match muttrcSimplePat contained "!\?\^\?[~][ADEFgGklNOpPQRSTuUvV=$]"
478 syn match muttrcSimplePat contained "!\?\^\?[~][mnXz]\s\+\%([<>-][0-9]\+\|[0-9]\+[-][0-9]*\)"
479 syn match muttrcSimplePat contained "!\?\^\?[~][dr]\s\+\%(\%(-\?[0-9]\{1,2}\%(/[0-9]\{1,2}\%(/[0-9]\{2}\%([0-9]\{2}\)\?\)\?\)\?\%([+*-][0-9]\+[ymwd]\)*\)\|\%(\%([0-9]\{1,2}\%(/[0-9]\{1,2}\%(/[0-9]\{2}\%([0-9]\{2}\)\?\)\?\)\?\%([+*-][0-9]\+[ymwd]\)*\)-\%([0-9]\{1,2}\%(/[0-9]\{1,2}\%(/[0-9]\{2}\%([0-9]\{2}\)\?\)\?\)\?\%([+*-][0-9]\+[ymwd]\)\?\)\?\)\|\%([<>=][0-9]\+[ymwd]\)\|\%(`[^`]\+`\)\|\%(\$[a-zA-Z0-9_-]\+\)\)" contains=muttrcShellString,muttrcVariable
480 syn match muttrcSimplePat contained "!\?\^\?[~][bBcCefhHiLstxy]\s\+" nextgroup=muttrcSimplePatRXContainer
481 syn match muttrcSimplePat contained "!\?\^\?[%][bBcCefhHiLstxy]\s\+" nextgroup=muttrcSimplePatString
482 syn match muttrcSimplePat contained "!\?\^\?[=][bh]\s\+" nextgroup=muttrcSimplePatString
483 syn region muttrcSimplePat contained keepend start=+!\?\^\?[~](+ end=+)+ contains=muttrcSimplePat
484 "syn match muttrcSimplePat contained /'[^~=%][^']*/
485 "contains=muttrcRXPat
486 syn match muttrcSimplePatString contained /[a-zA-Z0-9]\+/
487 syn region muttrcSimplePatString contained keepend start=+"+ end=+"+ skip=+\\"+
488 syn region muttrcSimplePatString contained keepend start=+'+ end=+'+ skip=+\\'+
489 syn region muttrcSimplePatRXContainer contained keepend start=+"+ end=+"+ skip=+\\"+ contains=muttrcRXPat
490 syn region muttrcSimplePatRXContainer contained keepend start=+'+ end=+'+ skip=+\\'+ contains=muttrcRXPat
491 syn match muttrcSimplePatRXContainer contained /\S\+/ contains=muttrcRXPat
492 syn match muttrcSimplePatMetas contained /[(|)]/
494 syn region muttrcPattern contained keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPatternInner
495 syn region muttrcPattern contained keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPatternInner
496 syn match muttrcPattern contained "[~]\([A-Za-z]\|([^)]\+)\)" contains=muttrcSimplePat
497 syn region muttrcPatternInner contained keepend start=+"[~=%!(^]+ms=s+1 skip=+\\"+ end=+"+me=e-1 contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas
498 syn region muttrcPatternInner contained keepend start=+'[~=%!(^]+ms=s+1 skip=+\\'+ end=+'+me=e-1 contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas
500 " Colour definitions takes object, foreground and background arguments (regexps excluded).
501 syn match muttrcColorMatchCount contained "[0-9]\+"
502 syn match muttrcColorMatchCountNL contained skipwhite skipnl "\s*\\$" nextgroup=muttrcColorMatchCount,muttrcColorMatchCountNL
503 syn region muttrcColorRXPat contained start=+\s*'+ skip=+\\'+ end=+'\s*+ keepend skipwhite contains=muttrcRXString2 nextgroup=muttrcColorMatchCount,muttrcColorMatchCountNL
504 syn region muttrcColorRXPat contained start=+\s*"+ skip=+\\"+ end=+"\s*+ keepend skipwhite contains=muttrcRXString2 nextgroup=muttrcColorMatchCount,muttrcColorMatchCountNL
505 syn keyword muttrcColorField contained attachment body bold error hdrdefault header index indicator markers message normal quoted search signature status tilde tree underline
506 syn match muttrcColorField contained "\<quoted\d\=\>"
507 syn keyword muttrcColor contained black blue cyan default green magenta red white yellow
508 syn keyword muttrcColor contained brightblack brightblue brightcyan brightdefault brightgreen brightmagenta brightred brightwhite brightyellow
509 syn match muttrcColor contained "\<\%(bright\)\=color\d\{1,2}\>"
510 " Now for the structure of the color line
511 syn match muttrcColorRXNL contained skipnl "\s*\\$" nextgroup=muttrcColorRXPat,muttrcColorRXNL
512 syn match muttrcColorBG contained /\s*[$]\?\w\+/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcColorRXPat,muttrcColorRXNL
513 syn match muttrcColorBGNL contained skipnl "\s*\\$" nextgroup=muttrcColorBG,muttrcColorBGNL
514 syn match muttrcColorFG contained /\s*[$]\?\w\+/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcColorBG,muttrcColorBGNL
515 syn match muttrcColorFGNL contained skipnl "\s*\\$" nextgroup=muttrcColorFG,muttrcColorFGNL
516 syn match muttrcColorContext contained /\s*[$]\?\w\+/ contains=muttrcColorField,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcColorFG,muttrcColorFGNL
517 syn match muttrcColorNL contained skipnl "\s*\\$" nextgroup=muttrcColorContext,muttrcColorNL
518 syn match muttrcColorKeyword contained /^\s*color\s\+/ nextgroup=muttrcColorContext,muttrcColorNL
519 syn region muttrcColorLine keepend start=/^\s*color\s\+\%(index\)\@!/ skip=+\\$+ end=+$+ contains=muttrcColorKeyword,muttrcComment,muttrcUnHighlightSpace
520 " Now for the structure of the color index line
521 syn match muttrcPatternNL contained skipnl "\s*\\$" nextgroup=muttrcPattern,muttrcPatternNL
522 syn match muttrcColorBGI contained /\s*[$]\?\w\+\s*/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcPattern,muttrcPatternNL
523 syn match muttrcColorBGNLI contained skipnl "\s*\\$" nextgroup=muttrcColorBGI,muttrcColorBGNLI
524 syn match muttrcColorFGI contained /\s*[$]\?\w\+/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcColorBGI,muttrcColorBGNLI
525 syn match muttrcColorFGNLI contained skipnl "\s*\\$" nextgroup=muttrcColorFGI,muttrcColorFGNLI
526 syn match muttrcColorContextI contained /\s*index/ contains=muttrcUnHighlightSpace nextgroup=muttrcColorFGI,muttrcColorFGNLI
527 syn match muttrcColorNLI contained skipnl "\s*\\$" nextgroup=muttrcColorContextI,muttrcColorNLI
528 syn match muttrcColorKeywordI contained /^\s*color\s\+/ nextgroup=muttrcColorContextI,muttrcColorNLI
529 syn region muttrcColorLine keepend start=/^\s*color\s\+index/ skip=+\\$+ end=+$+ contains=muttrcColorKeywordI,muttrcComment,muttrcUnHighlightSpace
530 " And now color's brother:
531 syn region muttrcUnColorPatterns contained skipwhite start=+\s*'+ end=+'+ skip=+\\'+ contains=muttrcPattern nextgroup=muttrcUnColorPatterns,muttrcUnColorPatNL
532 syn region muttrcUnColorPatterns contained skipwhite start=+\s*"+ end=+"+ skip=+\\"+ contains=muttrcPattern nextgroup=muttrcUnColorPatterns,muttrcUnColorPatNL
533 syn match muttrcUnColorPatterns contained skipwhite /\s*[^'"\s]\S\*/ contains=muttrcPattern nextgroup=muttrcUnColorPatterns,muttrcUnColorPatNL
534 syn match muttrcUnColorPatNL contained skipwhite skipnl /\s*\\$/ nextgroup=muttrcUnColorPatterns,muttrcUnColorPatNL
535 syn match muttrcUnColorAll contained skipwhite /[*]/
536 syn match muttrcUnColorAPNL contained skipwhite skipnl /\s*\\$/ nextgroup=muttrcUnColorPatterns,muttrcUnColorAll,muttrcUnColorAPNL
537 syn match muttrcUnColorIndex contained skipwhite /\s*index\s\+/ nextgroup=muttrcUnColorPatterns,muttrcUnColorAll,muttrcUnColorAPNL
538 syn match muttrcUnColorIndexNL contained skipwhite skipnl /\s*\\$/ nextgroup=muttrcUnColorIndex,muttrcUnColorIndexNL
539 syn match muttrcUnColorKeyword contained skipwhite /^\s*uncolor\s\+/ nextgroup=muttrcUnColorIndex,muttrcUnColorIndexNL
540 syn region muttrcUnColorLine keepend start=+^\s*uncolor\s+ skip=+\\$+ end=+$+ contains=muttrcUnColorKeyword,muttrcComment,muttrcUnHighlightSpace
542 " Mono are almost like color (ojects inherited from color)
543 syn keyword muttrcMonoAttrib contained bold none normal reverse standout underline
544 syn keyword muttrcMono contained mono skipwhite nextgroup=muttrcColorField
545 syn match muttrcMonoLine "^\s*mono\s\+\S\+" skipwhite nextgroup=muttrcMonoAttrib contains=muttrcMono
547 " Define the default highlighting.
548 " For version 5.7 and earlier: only when not done already
549 " For version 5.8 and later: only when an item doesn't have highlighting yet
550 if version >= 508 || !exists("did_muttrc_syntax_inits")
552 let did_muttrc_syntax_inits = 1
553 command -nargs=+ HiLink hi link <args>
555 command -nargs=+ HiLink hi def link <args>
558 HiLink muttrcComment Comment
559 HiLink muttrcEscape SpecialChar
560 HiLink muttrcRXChars SpecialChar
561 HiLink muttrcString String
562 HiLink muttrcRXString String
563 HiLink muttrcRXString2 String
564 HiLink muttrcSpecial Special
565 HiLink muttrcHooks Type
566 HiLink muttrcGroupFlag Type
567 HiLink muttrcGroupDef Macro
568 HiLink muttrcAddrDef muttrcGroupFlag
569 HiLink muttrcRXDef muttrcGroupFlag
570 HiLink muttrcRXPat String
571 HiLink muttrcAliasGroupName Macro
572 HiLink muttrcAliasKey Identifier
573 HiLink muttrcUnAliasKey Identifier
574 HiLink muttrcAliasEncEmail Identifier
575 HiLink muttrcAliasParens Type
576 HiLink muttrcNumber Number
577 HiLink muttrcQuadopt Boolean
578 HiLink muttrcEmail Special
579 HiLink muttrcVariable Special
580 HiLink muttrcHeader Type
581 HiLink muttrcKeySpecial SpecialChar
582 HiLink muttrcKey Type
583 HiLink muttrcKeyName SpecialChar
584 HiLink muttrcVarBool Identifier
585 HiLink muttrcVarQuad Identifier
586 HiLink muttrcVarNum Identifier
587 HiLink muttrcVarStr Identifier
588 HiLink muttrcMenu Identifier
589 HiLink muttrcCommand Keyword
590 HiLink muttrcSet Keyword
591 HiLink muttrcUnset muttrcCommand
592 HiLink muttrcReset muttrcCommand
593 HiLink muttrcToggle muttrcCommand
594 HiLink muttrcBind muttrcCommand
595 HiLink muttrcMacro muttrcCommand
596 HiLink muttrcMacroDescr String
597 HiLink muttrcAlias muttrcCommand
598 HiLink muttrcUnAlias muttrcCommand
599 HiLink muttrcUnhook muttrcCommand
600 HiLink muttrcUnhookLine Error
601 HiLink muttrcAction Macro
602 HiLink muttrcBadAction Error
603 HiLink muttrcBindFunction Error
604 HiLink muttrcBindMenuList Error
605 HiLink muttrcFunction Macro
606 HiLink muttrcGroupKeyword muttrcCommand
607 HiLink muttrcGroupLine Error
608 HiLink muttrcSubscribeKeyword muttrcCommand
609 HiLink muttrcSubscribeLine Error
610 HiLink muttrcListsKeyword muttrcCommand
611 HiLink muttrcListsLine Error
612 HiLink muttrcAlternateKeyword muttrcCommand
613 HiLink muttrcAlternatesLine Error
614 HiLink muttrcAttachmentsLine muttrcCommand
615 HiLink muttrcAttachmentsFlag Type
616 HiLink muttrcAttachmentsMimeType String
617 HiLink muttrcColorLine Error
618 HiLink muttrcColorContext Error
619 HiLink muttrcColorContextI Identifier
620 HiLink muttrcColorKeyword muttrcCommand
621 HiLink muttrcColorKeywordI muttrcColorKeyword
622 HiLink muttrcColorField Identifier
623 HiLink muttrcColor Type
624 HiLink muttrcColorFG Error
625 HiLink muttrcColorFGI Error
626 HiLink muttrcColorBG Error
627 HiLink muttrcColorBGI Error
628 HiLink muttrcMonoAttrib muttrcColor
629 HiLink muttrcMono muttrcCommand
630 HiLink muttrcSimplePat Identifier
631 HiLink muttrcSimplePatString Macro
632 HiLink muttrcSimplePatMetas Special
633 HiLink muttrcPattern Type
634 HiLink muttrcPatternInner Error
635 HiLink muttrcUnColorLine Error
636 HiLink muttrcUnColorKeyword muttrcCommand
637 HiLink muttrcUnColorIndex Identifier
638 HiLink muttrcShellString muttrcEscape
639 HiLink muttrcRXHooks muttrcCommand
640 HiLink muttrcRXHookNot Type
641 HiLink muttrcPatHooks muttrcCommand
642 HiLink muttrcPatHookNot Type
643 HiLink muttrcFormatConditionals2 Type
644 HiLink muttrcIndexFormatStr muttrcString
645 HiLink muttrcIndexFormatEscapes muttrcEscape
646 HiLink muttrcIndexFormatConditionals muttrcFormatConditionals2
647 HiLink muttrcAliasFormatStr muttrcString
648 HiLink muttrcAliasFormatEscapes muttrcEscape
649 HiLink muttrcAttachFormatStr muttrcString
650 HiLink muttrcAttachFormatEscapes muttrcEscape
651 HiLink muttrcAttachFormatConditionals muttrcFormatConditionals2
652 HiLink muttrcComposeFormatStr muttrcString
653 HiLink muttrcComposeFormatEscapes muttrcEscape
654 HiLink muttrcFolderFormatStr muttrcString
655 HiLink muttrcFolderFormatEscapes muttrcEscape
656 HiLink muttrcFolderFormatConditionals muttrcFormatConditionals2
657 HiLink muttrcMixFormatStr muttrcString
658 HiLink muttrcMixFormatEscapes muttrcEscape
659 HiLink muttrcMixFormatConditionals muttrcFormatConditionals2
660 HiLink muttrcPGPFormatStr muttrcString
661 HiLink muttrcPGPFormatEscapes muttrcEscape
662 HiLink muttrcPGPFormatConditionals muttrcFormatConditionals2
663 HiLink muttrcPGPCmdFormatStr muttrcString
664 HiLink muttrcPGPCmdFormatEscapes muttrcEscape
665 HiLink muttrcPGPCmdFormatConditionals muttrcFormatConditionals2
666 HiLink muttrcStatusFormatStr muttrcString
667 HiLink muttrcStatusFormatEscapes muttrcEscape
668 HiLink muttrcStatusFormatConditionals muttrcFormatConditionals2
669 HiLink muttrcPGPGetKeysFormatStr muttrcString
670 HiLink muttrcPGPGetKeysFormatEscapes muttrcEscape
671 HiLink muttrcSmimeFormatStr muttrcString
672 HiLink muttrcSmimeFormatEscapes muttrcEscape
673 HiLink muttrcSmimeFormatConditionals muttrcFormatConditionals2
674 HiLink muttrcTimeEscapes muttrcEscape
675 HiLink muttrcPGPTimeEscapes muttrcEscape
676 HiLink muttrcStrftimeEscapes Type
677 HiLink muttrcFormatErrors Error
679 HiLink muttrcBindFunctionNL SpecialChar
680 HiLink muttrcBindKeyNL SpecialChar
681 HiLink muttrcBindMenuListNL SpecialChar
682 HiLink muttrcMacroDescrNL SpecialChar
683 HiLink muttrcMacroBodyNL SpecialChar
684 HiLink muttrcMacroKeyNL SpecialChar
685 HiLink muttrcMacroMenuListNL SpecialChar
686 HiLink muttrcColorMatchCountNL SpecialChar
687 HiLink muttrcColorNL SpecialChar
688 HiLink muttrcColorRXNL SpecialChar
689 HiLink muttrcColorBGNL SpecialChar
690 HiLink muttrcColorFGNL SpecialChar
691 HiLink muttrcAliasNameNL SpecialChar
692 HiLink muttrcAliasENNL SpecialChar
693 HiLink muttrcAliasNL SpecialChar
694 HiLink muttrcUnAliasNL SpecialChar
695 HiLink muttrcAliasGroupDefNL SpecialChar
696 HiLink muttrcAliasEncEmailNL SpecialChar
697 HiLink muttrcPatternNL SpecialChar
698 HiLink muttrcUnColorPatNL SpecialChar
699 HiLink muttrcUnColorAPNL SpecialChar
700 HiLink muttrcUnColorIndexNL SpecialChar
705 let b:current_syntax = "muttrc"
707 "EOF vim: ts=8 noet tw=100 sw=8 sts=0 ft=vim