summaryrefslogtreecommitdiff
path: root/runtime/syntax/muttrc.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2008-06-24 21:56:24 +0000
committerBram Moolenaar <Bram@vim.org>2008-06-24 21:56:24 +0000
commit446cb837a017fc1c1b144cb5c2a35cb90abfbbcf (patch)
tree6c1fe56f2db8d4adbeee792b181b0659c4d1f216 /runtime/syntax/muttrc.vim
parent3577c6fafb77da5419cd1001dac56f204d480bdc (diff)
downloadvim-git-446cb837a017fc1c1b144cb5c2a35cb90abfbbcf.tar.gz
updated for version 7.2a
Diffstat (limited to 'runtime/syntax/muttrc.vim')
-rw-r--r--runtime/syntax/muttrc.vim201
1 files changed, 167 insertions, 34 deletions
diff --git a/runtime/syntax/muttrc.vim b/runtime/syntax/muttrc.vim
index fb88f6afd..0b1d16164 100644
--- a/runtime/syntax/muttrc.vim
+++ b/runtime/syntax/muttrc.vim
@@ -2,9 +2,9 @@
" Language: Mutt setup files
" Original: Preben 'Peppe' Guldberg <peppe-vim@wielders.org>
" Maintainer: Kyle Wheeler <kyle-muttrc.vim@memoryhole.net>
-" Last Change: 5 Mar 2007
+" Last Change: 15 Aug 2007
-" This file covers mutt version 1.5.14 (and most of CVS HEAD)
+" This file covers mutt version 1.5.16 (and most of CVS HEAD)
" Included are also a few features from 1.4.2.1
" For version 5.x: Clear all syntax items
@@ -30,18 +30,19 @@ syn match muttrcComment "[^\\]#.*$"lc=1
" Escape sequences (back-tick and pipe goes here too)
syn match muttrcEscape +\\[#tnr"'Cc ]+
syn match muttrcEscape +[`|]+
+syn match muttrcEscape +\\$+
" The variables takes the following arguments
syn match muttrcString "=\s*[^ #"'`]\+"lc=1 contains=muttrcEscape
-syn region muttrcString start=+"+ms=e skip=+\\"+ end=+"+ contains=muttrcEscape,muttrcSet,muttrcUnset,muttrcReset,muttrcToggle,muttrcCommand,muttrcAction
+syn region muttrcString start=+"+ms=e skip=+\\"+ end=+"+ contains=muttrcEscape,muttrcSet,muttrcUnset,muttrcReset,muttrcToggle,muttrcCommand,muttrcAction,muttrcShellString
syn region muttrcString start=+'+ms=e skip=+\\'+ end=+'+ contains=muttrcEscape,muttrcSet,muttrcUnset,muttrcReset,muttrcToggle,muttrcCommand,muttrcAction
syn region muttrcShellString matchgroup=muttrcEscape keepend start=+`+ skip=+\\`+ end=+`+ contains=muttrcVarStr,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcCommand,muttrcSet
syn match muttrcRXChars contained /[^\\][][.*?+]\+/hs=s+1
syn match muttrcRXChars contained /[][|()][.*?+]*/
-syn match muttrcRXChars contained /'^/ms=s+1
-syn match muttrcRXChars contained /$'/me=e-1
+syn match muttrcRXChars contained /['"]^/ms=s+1
+syn match muttrcRXChars contained /$['"]/me=e-1
syn match muttrcRXChars contained /\\/
" Why does muttrcRXString2 work with one \ when muttrcRXString requires two?
syn region muttrcRXString contained start=+'+ skip=+\\'+ end=+'+ contains=muttrcRXChars
@@ -78,21 +79,21 @@ syn match muttrcKeyName contained "\c<\%(BackSpace\|Delete\|Down\|End\|Enter\|
syn keyword muttrcVarBool contained allow_8bit allow_ansi arrow_cursor ascii_chars askbcc
syn keyword muttrcVarBool contained askcc attach_split auto_tag autoedit beep beep_new
-syn keyword muttrcVarBool contained bounce_delivered braille_friendly check_new collapse_unread
+syn keyword muttrcVarBool contained bounce_delivered braille_friendly check_new check_mbox_size collapse_unread
syn keyword muttrcVarBool contained confirmappend confirmcreate crypt_autoencrypt crypt_autopgp
syn keyword muttrcVarBool contained crypt_autosign crypt_autosmime crypt_replyencrypt
syn keyword muttrcVarBool contained crypt_replysign crypt_replysignencrypted crypt_timestamp
-syn keyword muttrcVarBool contained crypt_use_gpgme delete_untag digest_collapse duplicate_threads
+syn keyword muttrcVarBool contained crypt_use_gpgme crypt_use_pka delete_untag digest_collapse duplicate_threads
syn keyword muttrcVarBool contained edit_hdrs edit_headers encode_from envelope_from fast_reply
syn keyword muttrcVarBool contained fcc_attach fcc_clear followup_to force_name forw_decode
syn keyword muttrcVarBool contained forw_decrypt forw_quote forward_decode forward_decrypt
syn keyword muttrcVarBool contained forward_quote hdrs header help hidden_host hide_limited
syn keyword muttrcVarBool contained hide_missing hide_thread_subject hide_top_limited
-syn keyword muttrcVarBool contained hide_top_missing ignore_list_reply_to imap_check_subscribed
+syn keyword muttrcVarBool contained hide_top_missing ignore_linear_white_space ignore_list_reply_to imap_check_subscribed
syn keyword muttrcVarBool contained imap_list_subscribed imap_passive imap_peek imap_servernoise
syn keyword muttrcVarBool contained implicit_autoview include_onlyfirst keep_flagged
syn keyword muttrcVarBool contained mailcap_sanitize maildir_header_cache_verify maildir_trash
-syn keyword muttrcVarBool contained mark_old markers menu_move_off menu_scroll meta_key
+syn keyword muttrcVarBool contained mark_old markers menu_move_off menu_scroll message_cache_clean meta_key
syn keyword muttrcVarBool contained metoo mh_purge mime_forward_decode narrow_tree pager_stop
syn keyword muttrcVarBool contained pgp_auto_decode pgp_auto_traditional pgp_autoencrypt
syn keyword muttrcVarBool contained pgp_autoinline pgp_autosign pgp_check_exit
@@ -206,37 +207,133 @@ syn keyword muttrcVarNum contained connect_timeout history imap_keepalive mail_c
syn keyword muttrcVarNum contained pager_context pager_index_lines pgp_timeout pop_checkinterval read_inc
syn keyword muttrcVarNum contained save_history score_threshold_delete score_threshold_flag
syn keyword muttrcVarNum contained score_threshold_read sendmail_wait sleep_time smime_timeout
-syn keyword muttrcVarNum contained ssl_min_dh_prime_bits timeout wrap wrapmargin write_inc
+syn keyword muttrcVarNum contained ssl_min_dh_prime_bits timeout time_inc wrap wrapmargin write_inc
+
+syn match muttrcStrftimeEscapes contained /%[AaBbCcDdeFGgHhIjklMmnpRrSsTtUuVvWwXxYyZz+%]/
+syn match muttrcStrftimeEscapes contained /%E[cCxXyY]/
+syn match muttrcStrftimeEscapes contained /%O[BdeHImMSuUVwWy]/
+
+syn match muttrcFormatErrors contained /%./
+
+syn region muttrcIndexFormatStr contained keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcIndexFormatEscapes,muttrcIndexFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes
+syn region muttrcIndexFormatStr contained keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcIndexFormatEscapes,muttrcIndexFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes
+syn region muttrcAliasFormatStr contained keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcAliasFormatEscapes,muttrcFormatErrors
+syn region muttrcAliasFormatStr contained keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcAliasFormatEscapes,muttrcFormatErrors
+syn region muttrcAttachFormatStr contained keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcAttachFormatEscapes,muttrcAttachFormatConditionals,muttrcFormatErrors
+syn region muttrcAttachFormatStr contained keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcAttachFormatEscapes,muttrcAttachFormatConditionals,muttrcFormatErrors
+syn region muttrcComposeFormatStr contained keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcComposeFormatEscapes,muttrcFormatErrors
+syn region muttrcComposeFormatStr contained keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcComposeFormatEscapes,muttrcFormatErrors
+syn region muttrcFolderFormatStr contained keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcFolderFormatEscapes,muttrcFolderFormatConditionals,muttrcFormatErrors
+syn region muttrcFolderFormatStr contained keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcFolderFormatEscapes,muttrcFolderFormatConditionals,muttrcFormatErrors
+syn region muttrcMixFormatStr contained keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcMixFormatEscapes,muttrcMixFormatConditionals,muttrcFormatErrors
+syn region muttrcMixFormatStr contained keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcMixFormatEscapes,muttrcMixFormatConditionals,muttrcFormatErrors
+syn region muttrcPGPFormatStr contained keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPGPFormatEscapes,muttrcPGPFormatConditionals,muttrcFormatErrors,muttrcPGPTimeEscapes
+syn region muttrcPGPFormatStr contained keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPGPFormatEscapes,muttrcPGPFormatConditionals,muttrcFormatErrors,muttrcPGPTimeEscapes
+syn region muttrcPGPCmdFormatStr contained keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPGPCmdFormatEscapes,muttrcPGPCmdFormatConditionals,muttrcVariable,muttrcFormatErrors
+syn region muttrcPGPCmdFormatStr contained keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPGPCmdFormatEscapes,muttrcPGPCmdFormatConditionals,muttrcVariable,muttrcFormatErrors
+syn region muttrcStatusFormatStr contained keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcStatusFormatEscapes,muttrcStatusFormatConditionals,muttrcFormatErrors
+syn region muttrcStatusFormatStr contained keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcStatusFormatEscapes,muttrcStatusFormatConditionals,muttrcFormatErrors
+syn region muttrcPGPGetKeysFormatStr contained keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPGPGetKeysFormatEscapes,muttrcFormatErrors
+syn region muttrcPGPGetKeysFormatStr contained keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPGPGetKeysFormatEscapes,muttrcFormatErrors
+syn region muttrcSmimeFormatStr contained keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcSmimeFormatEscapes,muttrcSmimeFormatConditionals,muttrcVariable,muttrcFormatErrors
+syn region muttrcSmimeFormatStr contained keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcSmimeFormatEscapes,muttrcSmimeFormatConditionals,muttrcVariable,muttrcFormatErrors
+
+" The following info was pulled from hdr_format_str in hdrline.c
+syn match muttrcIndexFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[aAbBcCdDeEfFHilLmMnNOPsStTuvXyYZ%]/
+syn match muttrcIndexFormatConditionals contained /%?[EFHlLMNOXyY]?/ nextgroup=muttrcFormatConditionals2
+" The following info was pulled from alias_format_str in addrbook.c
+syn match muttrcAliasFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[afnrt%]/
+" The following info was pulled from mutt_attach_fmt in recvattach.c
+syn match muttrcAttachFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[CcDdefImMnQstTuX%]/
+syn match muttrcAttachFormatEscapes contained /%[>|*]./
+syn match muttrcAttachFormatConditionals contained /%?[CcdDefInmMQstTuX]?/ nextgroup=muttrcFormatConditionals2
+syn match muttrcFormatConditionals2 contained /[^?]*?/
+" The following info was pulled from compose_format_str in compose.c
+syn match muttrcComposeFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[ahlv%]/
+syn match muttrcComposeFormatEscapes contained /%[>|*]./
+" The following info was pulled from folder_format_str in browser.c
+syn match muttrcFolderFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[CdfFglNstu%]/
+syn match muttrcFolderFormatEscapes contained /%[>|*]./
+syn match muttrcFolderFormatConditionals contained /%?[N]?/
+" The following info was pulled from mix_entry_fmt in remailer.c
+syn match muttrcMixFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[ncsa%]/
+syn match muttrcMixFormatConditionals contained /%?[ncsa]?/
+" The following info was pulled from crypt_entry_fmt in crypt-gpgme.c
+" and pgp_entry_fmt in pgpkey.c (note that crypt_entry_fmt supports
+" 'p', but pgp_entry_fmt does not).
+syn match muttrcPGPFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[nkualfctp%]/
+syn match muttrcPGPFormatConditionals contained /%?[nkualfct]?/
+" The following info was pulled from _mutt_fmt_pgp_command in
+" pgpinvoke.c
+syn match muttrcPGPCmdFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[pfsar%]/
+syn match muttrcPGPCmdFormatConditionals contained /%?[pfsar]?/ nextgroup=muttrcFormatConditionals2
+" The following info was pulled from status_format_str in status.c
+syn match muttrcStatusFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[bdfFhlLmMnopPrsStuvV%]/
+syn match muttrcStatusFormatEscapes contained /%[>|*]./
+syn match muttrcStatusFormatConditionals contained /%?[bdFlLmMnoptuV]?/ nextgroup=muttrcFormatConditionals2
+" This matches the documentation, but directly contradicts the code
+" (according to the code, this should be identical to the
+" muttrcPGPCmdFormatEscapes
+syn match muttrcPGPGetKeysFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[r%]/
+" The following info was pulled from _mutt_fmt_smime_command in
+" smime.c
+syn match muttrcSmimeFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[Cciskaf%]/
+syn match muttrcSmimeFormatConditionals contained /%?[Cciskaf]?/ nextgroup=muttrcFormatConditionals2
+
+syn region muttrcTimeEscapes contained start=+%{+ end=+}+ contains=muttrcStrftimeEscapes
+syn region muttrcTimeEscapes contained start=+%\[+ end=+\]+ contains=muttrcStrftimeEscapes
+syn region muttrcTimeEscapes contained start=+%(+ end=+)+ contains=muttrcStrftimeEscapes
+syn region muttrcTimeEscapes contained start=+%<+ end=+>+ contains=muttrcStrftimeEscapes
+syn region muttrcPGPTimeEscapes contained start=+%\[+ end=+\]+ contains=muttrcStrftimeEscapes
+
+syn keyword muttrcVarStr contained attribution index_format message_format pager_format nextgroup=muttrcVarEqualsIdxFmt
+syn match muttrcVarEqualsIdxFmt contained "=" nextgroup=muttrcIndexFormatStr
+syn keyword muttrcVarStr contained alias_format nextgroup=muttrcVarEqualsAliasFmt
+syn match muttrcVarEqualsAliasFmt contained "=" nextgroup=muttrcAliasFormatStr
+syn keyword muttrcVarStr contained attach_format nextgroup=muttrcVarEqualsAttachFmt
+syn match muttrcVarEqualsAttachFmt contained "=" nextgroup=muttrcAttachFormatStr
+syn keyword muttrcVarStr contained compose_format nextgroup=muttrcVarEqualsComposeFmt
+syn match muttrcVarEqualsComposeFmt contained "=" nextgroup=muttrcComposeFormatStr
+syn keyword muttrcVarStr contained folder_format nextgroup=muttrcVarEqualsFolderFmt
+syn match muttrcVarEqualsFolderFmt contained "=" nextgroup=muttrcFolderFormatStr
+syn keyword muttrcVarStr contained mix_entry_format nextgroup=muttrcVarEqualsMixFmt
+syn match muttrcVarEqualsMixFmt contained "=" nextgroup=muttrcMixFormatStr
+syn keyword muttrcVarStr contained pgp_entry_format nextgroup=muttrcVarEqualsPGPFmt
+syn match muttrcVarEqualsPGPFmt contained "=" nextgroup=muttrcPGPFormatStr
+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
+syn match muttrcVarEqualsPGPCmdFmt contained "=" nextgroup=muttrcPGPCmdFormatStr
+syn keyword muttrcVarStr contained status_format nextgroup=muttrcVarEqualsStatusFmt
+syn match muttrcVarEqualsStatusFmt contained "=" nextgroup=muttrcStatusFormatStr
+syn keyword muttrcVarStr contained pgp_getkeys_command nextgroup=muttrcVarEqualsPGPGetKeysFmt
+syn match muttrcVarEqualsPGPGetKeysFmt contained "=" nextgroup=muttrcPGPGetKeysFormatStr
+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
+syn match muttrcVarEqualsSmimeFmt contained "=" nextgroup=muttrcSmimeFormatStr
syn match muttrcVarStr contained 'my_[a-zA-Z0-9_]\+'
-syn keyword muttrcVarStr contained alias_file alias_format assumed_charset attach_format attach_sep attribution
-syn keyword muttrcVarStr contained certificate_file charset compose_format config_charset content_type
+syn keyword muttrcVarStr contained alias_file assumed_charset attach_charset attach_sep
+syn keyword muttrcVarStr contained certificate_file charset config_charset content_type
syn keyword muttrcVarStr contained date_format default_hook display_filter dotlock_program dsn_notify
syn keyword muttrcVarStr contained dsn_return editor entropy_file envelope_from_address escape folder
-syn keyword muttrcVarStr contained folder_format forw_format forward_format from gecos_mask hdr_format
+syn keyword muttrcVarStr contained forw_format forward_format from gecos_mask hdr_format
syn keyword muttrcVarStr contained header_cache header_cache_pagesize history_file hostname imap_authenticators
-syn keyword muttrcVarStr contained imap_delim_chars imap_headers imap_home_namespace imap_idle imap_login imap_pass
-syn keyword muttrcVarStr contained imap_user indent_str indent_string index_format ispell locale mailcap_path
-syn keyword muttrcVarStr contained mask mbox mbox_type message_format message_cachedir mh_seq_flagged mh_seq_replied
-syn keyword muttrcVarStr contained mh_seq_unseen mix_entry_format mixmaster msg_format pager pager_format
-syn keyword muttrcVarStr contained pgp_clearsign_command pgp_decode_command pgp_decrypt_command
-syn keyword muttrcVarStr contained pgp_encrypt_only_command pgp_encrypt_sign_command pgp_entry_format
-syn keyword muttrcVarStr contained pgp_export_command pgp_getkeys_command pgp_good_sign pgp_import_command
-syn keyword muttrcVarStr contained pgp_list_pubring_command pgp_list_secring_command pgp_mime_signature_filename
+syn keyword muttrcVarStr contained imap_delim_chars imap_headers imap_idle imap_login imap_pass
+syn keyword muttrcVarStr contained imap_user indent_str indent_string ispell locale mailcap_path
+syn keyword muttrcVarStr contained mask mbox mbox_type message_cachedir mh_seq_flagged mh_seq_replied
+syn keyword muttrcVarStr contained mh_seq_unseen mixmaster msg_format pager
+syn keyword muttrcVarStr contained pgp_good_sign
+syn keyword muttrcVarStr contained pgp_mime_signature_filename
syn keyword muttrcVarStr contained pgp_mime_signature_description pgp_sign_as
-syn keyword muttrcVarStr contained pgp_sign_command pgp_sort_keys pgp_verify_command pgp_verify_key_command
+syn keyword muttrcVarStr contained pgp_sort_keys
syn keyword muttrcVarStr contained pipe_sep pop_authenticators pop_host pop_pass pop_user post_indent_str
syn keyword muttrcVarStr contained post_indent_string postponed preconnect print_cmd print_command
syn keyword muttrcVarStr contained query_command quote_regexp realname record reply_regexp send_charset
syn keyword muttrcVarStr contained sendmail shell signature simple_search smileys smime_ca_location
-syn keyword muttrcVarStr contained smime_certificates smime_decrypt_command smime_default_key
-syn keyword muttrcVarStr contained smime_encrypt_command smime_encrypt_with smime_get_cert_command
-syn keyword muttrcVarStr contained smime_get_cert_email_command smime_get_signer_cert_command
-syn keyword muttrcVarStr contained smime_import_cert_command smime_keys smime_pk7out_command smime_sign_as
-syn keyword muttrcVarStr contained smime_sign_command smime_sign_opaque_command smime_verify_command
-syn keyword muttrcVarStr contained smime_verify_opaque_command smtp_url smtp_authenticators sort sort_alias sort_aux
+syn keyword muttrcVarStr contained smime_certificates smime_default_key
+syn keyword muttrcVarStr contained smime_encrypt_with
+syn keyword muttrcVarStr contained smime_keys smime_sign_as
+syn keyword muttrcVarStr contained smtp_url smtp_authenticators smtp_pass sort sort_alias sort_aux
syn keyword muttrcVarStr contained sort_browser spam_separator spoolfile ssl_ca_certificates_file ssl_client_cert
-syn keyword muttrcVarStr contained status_chars status_format tmpdir to_chars tunnel visual
+syn keyword muttrcVarStr contained status_chars tmpdir to_chars tunnel visual
" Present in 1.4.2.1 (pgp_create_traditional was a bool then)
syn keyword muttrcVarBool contained imap_force_ssl imap_force_ssl noinvimap_force_ssl
@@ -372,12 +469,13 @@ syn match muttrcUnAlias /^\s*unalias\s\?/ nextgroup=muttrcUnAliasKey,muttrcUnAl
syn match muttrcSimplePat contained "!\?\^\?[~][ADEFgGklNOpPQRSTuUvV=$]"
syn match muttrcSimplePat contained "!\?\^\?[~][mnXz]\s\+\%([<>-][0-9]\+\|[0-9]\+[-][0-9]*\)"
-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]\)\)"
+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
syn match muttrcSimplePat contained "!\?\^\?[~][bBcCefhHiLstxy]\s\+" nextgroup=muttrcSimplePatRXContainer
syn match muttrcSimplePat contained "!\?\^\?[%][bBcCefhHiLstxy]\s\+" nextgroup=muttrcSimplePatString
syn match muttrcSimplePat contained "!\?\^\?[=][bh]\s\+" nextgroup=muttrcSimplePatString
-"syn match muttrcSimplePat contained /"[^~=%][^"]*/ contains=muttrcRXPat
-"syn match muttrcSimplePat contained /'[^~=%][^']*/ contains=muttrcRXPat
+syn region muttrcSimplePat contained keepend start=+!\?\^\?[~](+ end=+)+ contains=muttrcSimplePat
+"syn match muttrcSimplePat contained /'[^~=%][^']*/
+"contains=muttrcRXPat
syn match muttrcSimplePatString contained /[a-zA-Z0-9]\+/
syn region muttrcSimplePatString contained keepend start=+"+ end=+"+ skip=+\\"+
syn region muttrcSimplePatString contained keepend start=+'+ end=+'+ skip=+\\'+
@@ -388,7 +486,7 @@ syn match muttrcSimplePatMetas contained /[(|)]/
syn region muttrcPattern contained keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPatternInner
syn region muttrcPattern contained keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPatternInner
-syn match muttrcPattern contained "[~][A-Za-z]" contains=muttrcSimplePat
+syn match muttrcPattern contained "[~]\([A-Za-z]\|([^)]\+)\)" contains=muttrcSimplePat
syn region muttrcPatternInner contained keepend start=+"[~=%!(^]+ms=s+1 skip=+\\"+ end=+"+me=e-1 contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas
syn region muttrcPatternInner contained keepend start=+'[~=%!(^]+ms=s+1 skip=+\\'+ end=+'+me=e-1 contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas
@@ -535,6 +633,41 @@ if version >= 508 || !exists("did_muttrc_syntax_inits")
HiLink muttrcRXHookNot Type
HiLink muttrcPatHooks muttrcCommand
HiLink muttrcPatHookNot Type
+ HiLink muttrcFormatConditionals2 Type
+ HiLink muttrcIndexFormatStr muttrcString
+ HiLink muttrcIndexFormatEscapes muttrcEscape
+ HiLink muttrcIndexFormatConditionals muttrcFormatConditionals2
+ HiLink muttrcAliasFormatStr muttrcString
+ HiLink muttrcAliasFormatEscapes muttrcEscape
+ HiLink muttrcAttachFormatStr muttrcString
+ HiLink muttrcAttachFormatEscapes muttrcEscape
+ HiLink muttrcAttachFormatConditionals muttrcFormatConditionals2
+ HiLink muttrcComposeFormatStr muttrcString
+ HiLink muttrcComposeFormatEscapes muttrcEscape
+ HiLink muttrcFolderFormatStr muttrcString
+ HiLink muttrcFolderFormatEscapes muttrcEscape
+ HiLink muttrcFolderFormatConditionals muttrcFormatConditionals2
+ HiLink muttrcMixFormatStr muttrcString
+ HiLink muttrcMixFormatEscapes muttrcEscape
+ HiLink muttrcMixFormatConditionals muttrcFormatConditionals2
+ HiLink muttrcPGPFormatStr muttrcString
+ HiLink muttrcPGPFormatEscapes muttrcEscape
+ HiLink muttrcPGPFormatConditionals muttrcFormatConditionals2
+ HiLink muttrcPGPCmdFormatStr muttrcString
+ HiLink muttrcPGPCmdFormatEscapes muttrcEscape
+ HiLink muttrcPGPCmdFormatConditionals muttrcFormatConditionals2
+ HiLink muttrcStatusFormatStr muttrcString
+ HiLink muttrcStatusFormatEscapes muttrcEscape
+ HiLink muttrcStatusFormatConditionals muttrcFormatConditionals2
+ HiLink muttrcPGPGetKeysFormatStr muttrcString
+ HiLink muttrcPGPGetKeysFormatEscapes muttrcEscape
+ HiLink muttrcSmimeFormatStr muttrcString
+ HiLink muttrcSmimeFormatEscapes muttrcEscape
+ HiLink muttrcSmimeFormatConditionals muttrcFormatConditionals2
+ HiLink muttrcTimeEscapes muttrcEscape
+ HiLink muttrcPGPTimeEscapes muttrcEscape
+ HiLink muttrcStrftimeEscapes Type
+ HiLink muttrcFormatErrors Error
HiLink muttrcBindFunctionNL SpecialChar
HiLink muttrcBindKeyNL SpecialChar
@@ -564,4 +697,4 @@ endif
let b:current_syntax = "muttrc"
-"EOF vim: ts=8 noet tw=100 sw=8 sts=0
+"EOF vim: ts=8 noet tw=100 sw=8 sts=0 ft=vim