1" Vim syntax file 2" Language: Mutt setup files 3" Original: Preben 'Peppe' Guldberg <[email protected]> 4" Maintainer: Kyle Wheeler <[email protected]> 5" Last Change: 22 Apr 2006 6 7" This file covers mutt version 1.5.11 8" Included are also a few features from 1.4.2.1 9 10" For version 5.x: Clear all syntax items 11" For version 6.x: Quit when a syntax file was already loaded 12if version < 600 13 syntax clear 14elseif exists("b:current_syntax") 15 finish 16endif 17 18" Set the keyword characters 19if version < 600 20 set isk=@,48-57,_,- 21else 22 setlocal isk=@,48-57,_,- 23endif 24 25syn match muttrcComment "^#.*$" 26syn match muttrcComment "[^\\]#.*$"lc=1 27 28" Escape sequences (back-tick and pipe goes here too) 29syn match muttrcEscape +\\[#tnr"'Cc]+ 30syn match muttrcEscape +[`|]+ 31 32" The variables takes the following arguments 33syn match muttrcString "=\s*[^ #"'`]\+"lc=1 contains=muttrcEscape 34syn region muttrcString start=+"+ms=e skip=+\\"+ end=+"+ contains=muttrcEscape,muttrcSet,muttrcUnset,muttrcReset,muttrcToggle,muttrcMacro,muttrcCommand,muttrcAction 35syn region muttrcString start=+'+ms=e skip=+\\'+ end=+'+ contains=muttrcEscape,muttrcSet,muttrcUnset,muttrcReset,muttrcToggle,muttrcMacro,muttrcCommand,muttrcAction 36 37syn region muttrcShellString matchgroup=muttrcEscape keepend start=+`+ skip=+\\`+ end=+`+ contains=muttrcVarStr,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcCommand,muttrcSet 38 39syn match muttrcRXChars contained /[^\\][][.*?+]\+/hs=s+1 40syn match muttrcRXChars contained /[][|()][.*?+]*/ 41syn match muttrcRXChars contained /'^/ms=s+1 42syn match muttrcRXChars contained /$'/me=e-1 43syn match muttrcRXChars contained /\\/ 44syn region muttrcRXString contained start=+'+ skip=+\\'+ end=+'+ contains=muttrcRXChars 45syn region muttrcRXString contained start=+"+ skip=+\\"+ end=+"+ contains=muttrcRXChars 46 47syn region muttrcRXPat contained start=+'+ skip=+\\'+ end=+'\s*+ keepend skipwhite contains=muttrcRXString nextgroup=muttrcRXPat 48syn region muttrcRXPat contained start=+"+ skip=+\\"+ end=+"\s*+ keepend skipwhite contains=muttrcRXString nextgroup=muttrcRXPat 49syn match muttrcRXPat contained /[^-'"#!]\S\+\%(\s\|$\)/ skipwhite contains=muttrcRXChars nextgroup=muttrcRXPat 50syn match muttrcRXDef contained "-rx\s\+" skipwhite nextgroup=muttrcRXPat 51 52syn match muttrcSpecial +\(['"]\)!\1+ 53 54" Numbers and Quadoptions may be surrounded by " or ' 55syn match muttrcNumber /=\s*\d\+/lc=1 56syn match muttrcNumber /=\s*"\d\+"/lc=1 57syn match muttrcNumber /=\s*'\d\+'/lc=1 58syn match muttrcQuadopt +=\s*\%(ask-\)\=\%(yes\|no\)+lc=1 59syn match muttrcQuadopt +=\s*"\%(ask-\)\=\%(yes\|no\)"+lc=1 60syn match muttrcQuadopt +=\s*'\%(ask-\)\=\%(yes\|no\)'+lc=1 61 62" Now catch some email addresses and headers (purified version from mail.vim) 63syn match muttrcEmail "[a-zA-Z0-9._-]\+@[a-zA-Z0-9./-]\+" 64syn match muttrcHeader "\<\%(From\|To\|C[Cc]\|B[Cc][Cc]\|Reply-To\|Subject\|Return-Path\|Received\|Date\|Replied\|Attach\)\>:\=" 65 66syn match muttrcKeySpecial contained +\%(\\[Cc'"]\|\^\|\\[01]\d\{2}\)+ 67syn match muttrcKey contained "\S\+" contains=muttrcKeySpecial,muttrcKeyName 68syn region muttrcKey contained start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=muttrcKeySpecial,muttrcKeyName 69syn region muttrcKey contained start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=muttrcKeySpecial,muttrcKeyName 70syn match muttrcKeyName contained "\<f\%(\d\|10\)\>" 71syn match muttrcKeyName contained "\\[trne]" 72syn match muttrcKeyName contained "\c<\%(BackSpace\|Delete\|Down\|End\|Enter\|Esc\|Home\|Insert\|Left\|PageDown\|PageUp\|Return\|Right\|Space\|Tab\|Up\)>" 73 74syn keyword muttrcVarBool contained allow_8bit allow_ansi arrow_cursor ascii_chars askbcc 75syn keyword muttrcVarBool contained askcc attach_split auto_tag autoedit beep beep_new 76syn keyword muttrcVarBool contained bounce_delivered braille_friendly check_new collapse_unread 77syn keyword muttrcVarBool contained confirmappend confirmcreate crypt_autoencrypt crypt_autopgp 78syn keyword muttrcVarBool contained crypt_autosign crypt_autosmime crypt_replyencrypt 79syn keyword muttrcVarBool contained crypt_replysign crypt_replysignencrypted crypt_timestamp 80syn keyword muttrcVarBool contained crypt_use_gpgme delete_untag digest_collapse duplicate_threads 81syn keyword muttrcVarBool contained edit_hdrs edit_headers encode_from envelope_from fast_reply 82syn keyword muttrcVarBool contained fcc_attach fcc_clear followup_to force_name forw_decode 83syn keyword muttrcVarBool contained forw_decrypt forw_quote forward_decode forward_decrypt 84syn keyword muttrcVarBool contained forward_quote hdrs header help hidden_host hide_limited 85syn keyword muttrcVarBool contained hide_missing hide_thread_subject hide_top_limited 86syn keyword muttrcVarBool contained hide_top_missing ignore_list_reply_to imap_check_subscribed 87syn keyword muttrcVarBool contained imap_list_subscribed imap_passive imap_peek imap_servernoise 88syn keyword muttrcVarBool contained implicit_autoview include_onlyfirst keep_flagged 89syn keyword muttrcVarBool contained mailcap_sanitize maildir_header_cache_verify maildir_trash 90syn keyword muttrcVarBool contained mark_old markers menu_move_off menu_scroll meta_key 91syn keyword muttrcVarBool contained metoo mh_purge mime_forward_decode narrow_tree pager_stop 92syn keyword muttrcVarBool contained pgp_auto_decode pgp_auto_traditional pgp_autoencrypt 93syn keyword muttrcVarBool contained pgp_autoinline pgp_autosign pgp_check_exit 94syn keyword muttrcVarBool contained pgp_create_traditional pgp_ignore_subkeys pgp_long_ids 95syn keyword muttrcVarBool contained pgp_replyencrypt pgp_replyinline pgp_replysign 96syn keyword muttrcVarBool contained pgp_replysignencrypted pgp_retainable_sigs pgp_show_unusable 97syn keyword muttrcVarBool contained pgp_strict_enc pgp_use_gpg_agent pipe_decode pipe_split 98syn keyword muttrcVarBool contained pop_auth_try_all pop_last print_decode print_split 99syn keyword muttrcVarBool contained prompt_after read_only reply_self resolve reverse_alias 100syn keyword muttrcVarBool contained reverse_name reverse_realname rfc2047_parameters save_address 101syn keyword muttrcVarBool contained save_empty save_name score sig_dashes sig_on_top 102syn keyword muttrcVarBool contained smart_wrap smime_ask_cert_label smime_decrypt_use_default_key 103syn keyword muttrcVarBool contained smime_is_default sort_re ssl_force_tls ssl_use_sslv2 104syn keyword muttrcVarBool contained ssl_use_sslv3 ssl_use_tlsv1 ssl_usesystemcerts status_on_top 105syn keyword muttrcVarBool contained strict_threads suspend text_flowed thorough_search 106syn keyword muttrcVarBool contained thread_received tilde uncollapse_jump use_8bitmime 107syn keyword muttrcVarBool contained use_domain use_envelope_from use_from use_idn use_ipv6 108syn keyword muttrcVarBool contained user_agent wait_key weed wrap_search write_bcc 109 110syn keyword muttrcVarBool contained noallow_8bit noallow_ansi noarrow_cursor noascii_chars noaskbcc 111syn keyword muttrcVarBool contained noaskcc noattach_split noauto_tag noautoedit nobeep nobeep_new 112syn keyword muttrcVarBool contained nobounce_delivered nobraille_friendly nocheck_new nocollapse_unread 113syn keyword muttrcVarBool contained noconfirmappend noconfirmcreate nocrypt_autoencrypt nocrypt_autopgp 114syn keyword muttrcVarBool contained nocrypt_autosign nocrypt_autosmime nocrypt_replyencrypt 115syn keyword muttrcVarBool contained nocrypt_replysign nocrypt_replysignencrypted nocrypt_timestamp 116syn keyword muttrcVarBool contained nocrypt_use_gpgme nodelete_untag nodigest_collapse noduplicate_threads 117syn keyword muttrcVarBool contained noedit_hdrs noedit_headers noencode_from noenvelope_from nofast_reply 118syn keyword muttrcVarBool contained nofcc_attach nofcc_clear nofollowup_to noforce_name noforw_decode 119syn keyword muttrcVarBool contained noforw_decrypt noforw_quote noforward_decode noforward_decrypt 120syn keyword muttrcVarBool contained noforward_quote nohdrs noheader nohelp nohidden_host nohide_limited 121syn keyword muttrcVarBool contained nohide_missing nohide_thread_subject nohide_top_limited 122syn keyword muttrcVarBool contained nohide_top_missing noignore_list_reply_to noimap_check_subscribed 123syn keyword muttrcVarBool contained noimap_list_subscribed noimap_passive noimap_peek noimap_servernoise 124syn keyword muttrcVarBool contained noimplicit_autoview noinclude_onlyfirst nokeep_flagged 125syn keyword muttrcVarBool contained nomailcap_sanitize nomaildir_header_cache_verify nomaildir_trash 126syn keyword muttrcVarBool contained nomark_old nomarkers nomenu_move_off nomenu_scroll nometa_key 127syn keyword muttrcVarBool contained nometoo nomh_purge nomime_forward_decode nonarrow_tree nopager_stop 128syn keyword muttrcVarBool contained nopgp_auto_decode nopgp_auto_traditional nopgp_autoencrypt 129syn keyword muttrcVarBool contained nopgp_autoinline nopgp_autosign nopgp_check_exit 130syn keyword muttrcVarBool contained nopgp_create_traditional nopgp_ignore_subkeys nopgp_long_ids 131syn keyword muttrcVarBool contained nopgp_replyencrypt nopgp_replyinline nopgp_replysign 132syn keyword muttrcVarBool contained nopgp_replysignencrypted nopgp_retainable_sigs nopgp_show_unusable 133syn keyword muttrcVarBool contained nopgp_strict_enc nopgp_use_gpg_agent nopipe_decode nopipe_split 134syn keyword muttrcVarBool contained nopop_auth_try_all nopop_last noprint_decode noprint_split 135syn keyword muttrcVarBool contained noprompt_after noread_only noreply_self noresolve noreverse_alias 136syn keyword muttrcVarBool contained noreverse_name noreverse_realname norfc2047_parameters nosave_address 137syn keyword muttrcVarBool contained nosave_empty nosave_name noscore nosig_dashes nosig_on_top 138syn keyword muttrcVarBool contained nosmart_wrap nosmime_ask_cert_label nosmime_decrypt_use_default_key 139syn keyword muttrcVarBool contained nosmime_is_default nosort_re nossl_force_tls nossl_use_sslv2 140syn keyword muttrcVarBool contained nossl_use_sslv3 nossl_use_tlsv1 nossl_usesystemcerts nostatus_on_top 141syn keyword muttrcVarBool contained nostrict_threads nosuspend notext_flowed nothorough_search 142syn keyword muttrcVarBool contained nothread_received notilde nouncollapse_jump nouse_8bitmime 143syn keyword muttrcVarBool contained nouse_domain nouse_envelope_from nouse_from nouse_idn nouse_ipv6 144syn keyword muttrcVarBool contained nouser_agent nowait_key noweed nowrap_search nowrite_bcc 145 146syn keyword muttrcVarBool contained invallow_8bit invallow_ansi invarrow_cursor invascii_chars invaskbcc 147syn keyword muttrcVarBool contained invaskcc invattach_split invauto_tag invautoedit invbeep invbeep_new 148syn keyword muttrcVarBool contained invbounce_delivered invbraille_friendly invcheck_new invcollapse_unread 149syn keyword muttrcVarBool contained invconfirmappend invconfirmcreate invcrypt_autoencrypt invcrypt_autopgp 150syn keyword muttrcVarBool contained invcrypt_autosign invcrypt_autosmime invcrypt_replyencrypt 151syn keyword muttrcVarBool contained invcrypt_replysign invcrypt_replysignencrypted invcrypt_timestamp 152syn keyword muttrcVarBool contained invcrypt_use_gpgme invdelete_untag invdigest_collapse invduplicate_threads 153syn keyword muttrcVarBool contained invedit_hdrs invedit_headers invencode_from invenvelope_from invfast_reply 154syn keyword muttrcVarBool contained invfcc_attach invfcc_clear invfollowup_to invforce_name invforw_decode 155syn keyword muttrcVarBool contained invforw_decrypt invforw_quote invforward_decode invforward_decrypt 156syn keyword muttrcVarBool contained invforward_quote invhdrs invheader invhelp invhidden_host invhide_limited 157syn keyword muttrcVarBool contained invhide_missing invhide_thread_subject invhide_top_limited 158syn keyword muttrcVarBool contained invhide_top_missing invignore_list_reply_to invimap_check_subscribed 159syn keyword muttrcVarBool contained invimap_list_subscribed invimap_passive invimap_peek invimap_servernoise 160syn keyword muttrcVarBool contained invimplicit_autoview invinclude_onlyfirst invkeep_flagged 161syn keyword muttrcVarBool contained invmailcap_sanitize invmaildir_header_cache_verify invmaildir_trash 162syn keyword muttrcVarBool contained invmark_old invmarkers invmenu_move_off invmenu_scroll invmeta_key 163syn keyword muttrcVarBool contained invmetoo invmh_purge invmime_forward_decode invnarrow_tree invpager_stop 164syn keyword muttrcVarBool contained invpgp_auto_decode invpgp_auto_traditional invpgp_autoencrypt 165syn keyword muttrcVarBool contained invpgp_autoinline invpgp_autosign invpgp_check_exit 166syn keyword muttrcVarBool contained invpgp_create_traditional invpgp_ignore_subkeys invpgp_long_ids 167syn keyword muttrcVarBool contained invpgp_replyencrypt invpgp_replyinline invpgp_replysign 168syn keyword muttrcVarBool contained invpgp_replysignencrypted invpgp_retainable_sigs invpgp_show_unusable 169syn keyword muttrcVarBool contained invpgp_strict_enc invpgp_use_gpg_agent invpipe_decode invpipe_split 170syn keyword muttrcVarBool contained invpop_auth_try_all invpop_last invprint_decode invprint_split 171syn keyword muttrcVarBool contained invprompt_after invread_only invreply_self invresolve invreverse_alias 172syn keyword muttrcVarBool contained invreverse_name invreverse_realname invrfc2047_parameters invsave_address 173syn keyword muttrcVarBool contained invsave_empty invsave_name invscore invsig_dashes invsig_on_top 174syn keyword muttrcVarBool contained invsmart_wrap invsmime_ask_cert_label invsmime_decrypt_use_default_key 175syn keyword muttrcVarBool contained invsmime_is_default invsort_re invssl_force_tls invssl_use_sslv2 176syn keyword muttrcVarBool contained invssl_use_sslv3 invssl_use_tlsv1 invssl_usesystemcerts invstatus_on_top 177syn keyword muttrcVarBool contained invstrict_threads invsuspend invtext_flowed invthorough_search 178syn keyword muttrcVarBool contained invthread_received invtilde invuncollapse_jump invuse_8bitmime 179syn keyword muttrcVarBool contained invuse_domain invuse_envelope_from invuse_from invuse_idn invuse_ipv6 180syn keyword muttrcVarBool contained invuser_agent invwait_key invweed invwrap_search invwrite_bcc 181 182syn keyword muttrcVarQuad contained abort_nosubject abort_unmodified bounce copy 183syn keyword muttrcVarQuad contained crypt_verify_sig delete forward_edit honor_followup_to 184syn keyword muttrcVarQuad contained include mime_forward mime_forward_rest mime_fwd move 185syn keyword muttrcVarQuad contained pgp_mime_auto pgp_verify_sig pop_delete pop_reconnect 186syn keyword muttrcVarQuad contained postpone print quit recall reply_to ssl_starttls 187 188syn keyword muttrcVarQuad contained noabort_nosubject noabort_unmodified nobounce nocopy 189syn keyword muttrcVarQuad contained nocrypt_verify_sig nodelete noforward_edit nohonor_followup_to 190syn keyword muttrcVarQuad contained noinclude nomime_forward nomime_forward_rest nomime_fwd nomove 191syn keyword muttrcVarQuad contained nopgp_mime_auto nopgp_verify_sig nopop_delete nopop_reconnect 192syn keyword muttrcVarQuad contained nopostpone noprint noquit norecall noreply_to nossl_starttls 193 194syn keyword muttrcVarQuad contained invabort_nosubject invabort_unmodified invbounce invcopy 195syn keyword muttrcVarQuad contained invcrypt_verify_sig invdelete invforward_edit invhonor_followup_to 196syn keyword muttrcVarQuad contained invinclude invmime_forward invmime_forward_rest invmime_fwd invmove 197syn keyword muttrcVarQuad contained invpgp_mime_auto invpgp_verify_sig invpop_delete invpop_reconnect 198syn keyword muttrcVarQuad contained invpostpone invprint invquit invrecall invreply_to invssl_starttls 199 200syn keyword muttrcVarNum contained connect_timeout history imap_keepalive mail_check menu_context net_inc 201syn keyword muttrcVarNum contained pager_context pager_index_lines pgp_timeout pop_checkinterval read_inc 202syn keyword muttrcVarNum contained score_threshold_delete score_threshold_flag score_threshold_read 203syn keyword muttrcVarNum contained sendmail_wait sleep_time smime_timeout ssl_min_dh_prime_bits timeout 204syn keyword muttrcVarNum contained wrapmargin write_inc 205 206syn keyword muttrcVarStr contained alias_file alias_format attach_format attach_sep attribution 207syn keyword muttrcVarStr contained certificate_file charset compose_format config_charset content_type 208syn keyword muttrcVarStr contained date_format default_hook display_filter dotlock_program dsn_notify 209syn keyword muttrcVarStr contained dsn_return editor entropy_file envelope_from_address escape folder 210syn keyword muttrcVarStr contained folder_format forw_format forward_format from gecos_mask hdr_format 211syn keyword muttrcVarStr contained header_cache header_cache_pagesize hostname imap_authenticators 212syn keyword muttrcVarStr contained imap_delim_chars imap_headers imap_home_namespace imap_login imap_pass 213syn keyword muttrcVarStr contained imap_user indent_str indent_string index_format ispell locale mailcap_path 214syn keyword muttrcVarStr contained mask mbox mbox_type message_format mh_seq_flagged mh_seq_replied 215syn keyword muttrcVarStr contained mh_seq_unseen mix_entry_format mixmaster msg_format pager pager_format 216syn keyword muttrcVarStr contained pgp_clearsign_command pgp_decode_command pgp_decrypt_command 217syn keyword muttrcVarStr contained pgp_encrypt_only_command pgp_encrypt_sign_command pgp_entry_format 218syn keyword muttrcVarStr contained pgp_export_command pgp_getkeys_command pgp_good_sign pgp_import_command 219syn keyword muttrcVarStr contained pgp_list_pubring_command pgp_list_secring_command pgp_sign_as 220syn keyword muttrcVarStr contained pgp_sign_command pgp_sort_keys pgp_verify_command pgp_verify_key_command 221syn keyword muttrcVarStr contained pipe_sep pop_authenticators pop_host pop_pass pop_user post_indent_str 222syn keyword muttrcVarStr contained post_indent_string postponed preconnect print_cmd print_command 223syn keyword muttrcVarStr contained query_command quote_regexp realname record reply_regexp send_charset 224syn keyword muttrcVarStr contained sendmail shell signature simple_search smileys smime_ca_location 225syn keyword muttrcVarStr contained smime_certificates smime_decrypt_command smime_default_key 226syn keyword muttrcVarStr contained smime_encrypt_command smime_encrypt_with smime_get_cert_command 227syn keyword muttrcVarStr contained smime_get_cert_email_command smime_get_signer_cert_command 228syn keyword muttrcVarStr contained smime_import_cert_command smime_keys smime_pk7out_command smime_sign_as 229syn keyword muttrcVarStr contained smime_sign_command smime_sign_opaque_command smime_verify_command 230syn keyword muttrcVarStr contained smime_verify_opaque_command sort sort_alias sort_aux sort_browser 231syn keyword muttrcVarStr contained spam_separator spoolfile ssl_ca_certificates_file ssl_client_cert 232syn keyword muttrcVarStr contained status_chars status_format tmpdir to_chars tunnel visual 233 234" Present in 1.4.2.1 (pgp_create_traditional was a bool then) 235syn keyword muttrcVarBool contained imap_force_ssl imap_force_ssl noinvimap_force_ssl 236"syn keyword muttrcVarQuad contained pgp_create_traditional nopgp_create_traditional invpgp_create_traditional 237syn keyword muttrcVarStr contained alternates 238 239syn keyword muttrcMenu contained alias attach browser compose editor index pager postpone pgp mix query generic 240syn match muttrcMenuList "\S\+" contained contains=muttrcMenu 241syn match muttrcMenuCommas /,/ contained 242 243syn keyword muttrcCommand auto_view alternative_order charset-hook exec unalternative_order 244syn keyword muttrcCommand hdr_order iconv-hook ignore mailboxes my_hdr unmailboxes 245syn keyword muttrcCommand pgp-hook push score source unauto_view unhdr_order 246syn keyword muttrcCommand unhook unignore unmono unmy_hdr unscore 247syn keyword muttrcCommand mime_lookup unmime_lookup spam ungroup 248syn keyword muttrcCommand nospam unalternative_order 249 250syn match muttrcAttachmentsMimeType contained "[*a-z0-9_-]\+/[*a-z0-9._-]\+\s*" skipwhite nextgroup=muttrcAttachmentsMimeType 251syn match muttrcAttachmentsFlag contained "[+-]\%([AI]\|inline\|attachment\)\s\+" skipwhite nextgroup=muttrcAttachmentsMimeType 252syn match muttrcAttachmentsLine "^\s*\%(un\)\?attachments\s\+" skipwhite nextgroup=muttrcAttachmentsFlag 253 254syn match muttrcUnHighlightSpace contained "\%(\s\+\|\\$\)" 255 256syn keyword muttrcListsKeyword contained lists unlists 257syn region muttrcListsLine keepend start=+^\s*\%(un\)\?lists\s+ skip=+\\$+ end=+$+ contains=muttrcListsKeyword,muttrcRXPat,muttrcGroupDef,muttrcUnHighlightSpace,muttrcComment 258 259syn keyword muttrcSubscribeKeyword contained subscribe unsubscribe 260syn region muttrcSubscribeLine keepend start=+^\s*\%(un\)\?subscribe\s+ skip=+\\$+ end=+$+ contains=muttrcSubscribeKeyword,muttrcRXPat,muttrcGroupDef,muttrcUnHighlightSpace,muttrcComment 261 262syn keyword muttrcAlternateKeyword contained alternates unalternates 263syn region muttrcAlternatesLine keepend start=+^\s*\%(un\)\?alternates\s+ skip=+\\$+ end=+$+ contains=muttrcAlternateKeyword,muttrcGroupDef,muttrcRXPat,muttrcUnHighlightSpace,muttrcComment 264 265syn match muttrcVariable "\$[a-zA-Z_-]\+" 266 267syn match muttrcBadAction contained "[^<>]\+" contains=muttrcEmail 268syn match muttrcFunction contained "\<\%(attach\|bounce\|copy\|delete\|display\|flag\|forward\|parent\|pipe\|postpone\|print\|recall\|resent\|save\|send\|tag\|undelete\)-message\>" 269syn match muttrcFunction contained "\<\%(delete\|next\|previous\|read\|tag\|undelete\)-thread\>" 270syn match muttrcFunction contained "\<\%(backward\|capitalize\|downcase\|forward\|kill\|upcase\)-word\>" 271syn match muttrcFunction contained "\<\%(delete\|filter\|first\|last\|next\|pipe\|previous\|print\|save\|select\|tag\|undelete\)-entry\>" 272syn match muttrcFunction contained "\<attach-\%(file\|key\)\>" 273syn match muttrcFunction contained "\<change-\%(dir\|folder\|folder-readonly\)\>" 274syn match muttrcFunction contained "\<check-\%(new\|traditional-pgp\)\>" 275syn match muttrcFunction contained "\<current-\%(bottom\|middle\|top\)\>" 276syn match muttrcFunction contained "\<decode-\%(copy\|save\)\>" 277syn match muttrcFunction contained "\<delete-\%(char\|pattern\|subthread\)\>" 278syn match muttrcFunction contained "\<display-\%(address\|toggle-weed\)\>" 279syn match muttrcFunction contained "\<edit\%(-\%(bcc\|cc\|description\|encoding\|fcc\|file\|from\|headers\|mime\|reply-to\|subject\|to\|type\)\)\?\>" 280syn match muttrcFunction contained "\<enter-\%(command\|mask\)\>" 281syn match muttrcFunction contained "\<half-\%(up\|down\)\>" 282syn match muttrcFunction contained "\<history-\%(up\|down\)\>" 283syn match muttrcFunction contained "\<kill-\%(eol\|eow\|line\)\>" 284syn match muttrcFunction contained "\<next-\%(line\|new\|page\|subthread\|undeleted\|unread\)\>" 285syn match muttrcFunction contained "\<previous-\%(line\|new\|page\|subthread\|undeleted\|unread\)\>" 286syn match muttrcFunction contained "\<search\%(-\%(next\|opposite\|reverse\|toggle\)\)\?\>" 287syn match muttrcFunction contained "\<show-\%(limit\|version\)\>" 288syn match muttrcFunction contained "\<sort-\%(mailbox\|reverse\)\>" 289syn match muttrcFunction contained "\<tag-\%(pattern\|prefix\)\>" 290syn match muttrcFunction contained "\<toggle-\%(mailboxes\|new\|quoted\|subscribed\|unlink\|write\)\>" 291syn match muttrcFunction contained "\<undelete-\%(pattern\|subthread\)\>" 292syn match muttrcFunction contained "\<collapse-\%(parts\|thread\|all\)\>" 293syn match muttrcFunction contained "\<view-\%(attach\|attachments\|file\|mailcap\|name\|text\)\>" 294syn 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\|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\|write-fcc\)\>" 295syn match muttrcAction contained "<[^>]\{-}>" contains=muttrcBadAction,muttrcFunction,muttrcKeyName 296 297syn keyword muttrcSet set skipwhite nextgroup=muttrcVar.* 298syn keyword muttrcUnset unset skipwhite nextgroup=muttrcVar.* 299syn keyword muttrcReset reset skipwhite nextgroup=muttrcVar.* 300syn keyword muttrcToggle toggle skipwhite nextgroup=muttrcVar.* 301 302" First, functions that take regular expressions: 303syn match muttrcRXHookNot contained /!\s*/ skipwhite nextgroup=muttrcRXString 304syn match muttrcRXHooks /^\s*\%(account\|folder\)-hook\s\+/ skipwhite nextgroup=muttrcRXHookNot,muttrcRXString 305 306" Now, functions that take patterns 307syn match muttrcPatHookNot contained /!\s*/ skipwhite nextgroup=muttrcPattern 308syn match muttrcPatHooks /^\s*\%(message\|mbox\|save\|fcc\%(-save\)\?\|send2\?\|reply\|crypt\)-hook\s\+/ nextgroup=muttrcPatHookNot,muttrcPattern 309 310syn match muttrcBindFunction contained /\S\+\%(\s\|$\)/ skipwhite contains=muttrcFunction 311syn match muttrcBindFunctionNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcBindFunction,muttrcBindFunctionNL 312syn match muttrcBindKey contained /\S\+/ skipwhite contains=muttrcKey nextgroup=muttrcBindFunction,muttrcBindFunctionNL 313syn match muttrcBindKeyNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcBindKey,muttrcBindKeyNL 314syn match muttrcBindMenuList contained /\S\+/ skipwhite contains=muttrcMenu,muttrcMenuCommas nextgroup=muttrcBindKey,muttrcBindKeyNL 315syn match muttrcBindMenuListNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcBindMenuList,muttrcBindMenuListNL 316syn match muttrcBind /^\s*bind\s\?/ skipwhite nextgroup=muttrcBindMenuList,muttrcBindMenuListNL 317 318syn match muttrcMacroKey contained /\S\+/ skipwhite contains=muttrcKey 319syn match muttrcMacroKeyNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcMacroKey,muttrcMacroKeyNL 320syn match muttrcMacroMenuList contained /\S\+/ skipwhite contains=muttrcMenu,muttrcMenuCommas nextgroup=muttrcMacroKey,muttrcMacroKeyNL 321syn match muttrcMacroMenuListNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcMacroMenuList,muttrcMacroMenuListNL 322syn match muttrcMacro /^\s*macro\s\?/ skipwhite nextgroup=muttrcMacroMenuList,muttrcMacroMenuListNL 323 324syn match muttrcAddrContent contained "[a-zA-Z0-9._-]\+@[a-zA-Z0-9./-]\+\s*" skipwhite contains=muttrcEmail nextgroup=muttrcAddrContent 325syn region muttrcAddrContent contained start=+'+ end=+'\s*+ skip=+\\'+ skipwhite contains=muttrcEmail nextgroup=muttrcAddrContent 326syn region muttrcAddrContent contained start=+"+ end=+"\s*+ skip=+\\"+ skipwhite contains=muttrcEmail nextgroup=muttrcAddrContent 327syn match muttrcAddrDef contained "-addr\s\+" skipwhite nextgroup=muttrcAddrContent 328 329syn match muttrcGroupFlag contained "-group" 330syn region muttrcGroupDef contained start="-group\s\+" skip="\\$" end="\s" skipwhite keepend contains=muttrcGroupFlag,muttrcUnHighlightSpace 331 332syn keyword muttrcGroupKeyword contained group ungroup 333syn region muttrcGroupLine keepend start=+^\s*\%(un\)\?group\s+ skip=+\\$+ end=+$+ contains=muttrcGroupKeyword,muttrcGroupDef,muttrcAddrDef,muttrcRXDef,muttrcUnHighlightSpace,muttrcComment 334 335syn match muttrcAliasGroupName contained /\w\+/ skipwhite nextgroup=muttrcAliasGroupDef,muttrcAliasAbbr,muttrcAliasNL 336syn match muttrcAliasGroupDefNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasGroupName,muttrcAliasGroupDefNL 337syn match muttrcAliasGroupDef contained /\s*-group/ skipwhite nextgroup=muttrcAliasGroupName,muttrcAliasGroupDefNL contains=muttrcGroupFlag 338syn match muttrcAliasEmail contained /\S\+@\S\+/ contains=muttrcEmail nextgroup=muttrcAliasName,muttrcAliasNameNL 339syn match muttrcAliasEncEmail contained /<[^>]\+>/ contains=muttrcEmail 340syn match muttrcAliasEncEmailNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasEncEmail,muttrcAliasEncEmailNL 341syn match muttrcAliasNameNoParens contained /[^<(@]\+\s\+/ nextgroup=muttrcAliasEncEmail,muttrcAliasEncEmailNL 342syn region muttrcAliasName contained matchgroup=Type start=/(/ end=/)/ skipwhite 343syn match muttrcAliasNameNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasName,muttrcAliasNameNL 344syn match muttrcAliasENNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasEmail,muttrcAliasNameNoParens,muttrcAliasENNL 345syn match muttrcAliasAbbr contained /\s*[^- \t]\S\+/ skipwhite nextgroup=muttrcAliasEmail,muttrcAliasNameNoParens,muttrcAliasENNL 346syn match muttrcAliasNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasGroupDef,muttrcAliasAbbr,muttrcAliasNL 347syn match muttrcAlias /^\s*alias\s/ skipwhite nextgroup=muttrcAliasGroupDef,muttrcAliasAbbr,muttrcAliasNL 348 349syn match muttrcUnAliasAbbr contained "\s*\w\+\s*" skipwhite nextgroup=muttrcUnAliasAbbr,muttrcUnAliasNL 350syn match muttrcUnAliasNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcUnAliasAbbr,muttrcUnAliasNL 351syn match muttrcUnAlias /^\s*unalias\s\?/ nextgroup=muttrcUnAliasAbbr,muttrcUnAliasNL 352 353syn match muttrcSimplePat contained "!\?\^\?[~][ADEFgGklNOpPQRSTuUvV=$]" 354syn match muttrcSimplePat contained "!\?\^\?[~][mnXz]\s\+\%([<>-][0-9]\+\|[0-9]\+[-][0-9]*\)" 355syn match muttrcSimplePat contained "!\?\^\?[~][dr]\s\+[0-9]\{2}\%(/[0-9]\{2}\%(/[0-9]\{2}\%([0-9]\{2}\)\)\?\)\?" 356syn match muttrcSimplePat contained "!\?\^\?[~][bBcCefhHiLstxy]\s\+" nextgroup=muttrcSimplePatRXContainer 357syn match muttrcSimplePat contained "!\?\^\?[%][bBcCefhHiLstxy]\s\+" nextgroup=muttrcSimplePatGroup 358"syn match muttrcSimplePat contained /"[^~=%][^"]*/ contains=muttrcRXPat 359"syn match muttrcSimplePat contained /'[^~=%][^']*/ contains=muttrcRXPat 360syn match muttrcSimplePatGroup contained /[a-zA-Z0-9]\+/ 361syn region muttrcSimplePatRXContainer contained keepend start=+"+ end=+"+ skip=+\\"+ contains=muttrcRXPat 362syn region muttrcSimplePatRXContainer contained keepend start=+'+ end=+'+ skip=+\\'+ contains=muttrcRXPat 363syn match muttrcSimplePatRXContainer contained /\S\+/ contains=muttrcRXPat 364syn match muttrcSimplePatMetas contained /[(|)]/ 365 366syn region muttrcPattern contained keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPatternInner 367syn region muttrcPattern contained keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPatternInner 368syn match muttrcPattern contained "[~][A-Za-z]" contains=muttrcSimplePat 369syn region muttrcPatternInner contained keepend start=+"[~=%!(^]+ms=s+1 skip=+\\"+ end=+"+me=e-1 contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas 370syn region muttrcPatternInner contained keepend start=+'[~=%!(^]+ms=s+1 skip=+\\'+ end=+'+me=e-1 contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas 371 372" Colour definitions takes object, foreground and background arguments (regexps excluded). 373syn match muttrcColorMatchCount contained "[0-9]\+" 374syn match muttrcColorMatchCountNL contained skipwhite skipnl "\s*\\$" nextgroup=muttrcColorMatchCount,muttrcColorMatchCountNL 375syn region muttrcColorRXPat contained start=+\s\+'+ skip=+\\'+ end=+'\s*+ keepend skipwhite contains=muttrcRXString nextgroup=muttrcColorMatchCount,muttrcColorMatchCountNL 376syn region muttrcColorRXPat contained start=+\s\+"+ skip=+\\"+ end=+"\s*+ keepend skipwhite contains=muttrcRXString nextgroup=muttrcColorMatchCount,muttrcColorMatchCountNL 377syn keyword muttrcColorField contained attachment body bold error hdrdefault header index indicator markers message normal quoted search signature status tilde tree underline 378syn match muttrcColorField contained "\<quoted\d\=\>" 379syn keyword muttrcColor contained black blue cyan default green magenta red white yellow 380syn keyword muttrcColor contained brightblack brightblue brightcyan brightdefault brightgreen brightmagenta brightred brightwhite brightyellow 381syn match muttrcColor contained "\<\%(bright\)\=color\d\{1,2}\>" 382" Now for the structure of the color line 383syn match muttrcColorRXNL contained skipwhite skipnl "\s*\\$" nextgroup=muttrcColorRXPat,muttrcColorRXNL 384syn match muttrcColorBG contained skipwhite /\s*[$]\?\w\+/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcColorRXPat,muttrcColorRXNL 385syn match muttrcColorBGNL contained skipwhite skipnl "\s*\\$" nextgroup=muttrcColorBG,muttrcColorBGNL 386syn match muttrcColorFG contained skipwhite /\s*[$]\?\w\+/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcColorBG,muttrcColorBGNL 387syn match muttrcColorFGNL contained skipwhite skipnl "\s*\\$" nextgroup=muttrcColorFG,muttrcColorFGNL 388syn match muttrcColorContext contained skipwhite /\s*[$]\?\w\+/ contains=muttrcColorField,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcColorFG,muttrcColorFGNL 389syn match muttrcColorNL contained skipwhite skipnl "\s*\\$" nextgroup=muttrcColorContext,muttrcColorNL 390syn match muttrcColorKeyword contained skipwhite /^\s*color\s\+/ nextgroup=muttrcColorContext,muttrcColorNL 391syn region muttrcColorLine keepend start=/^\s*color\s\+\%(index\)\@!/ skip=+\\$+ end=+$+ contains=muttrcColorKeyword,muttrcComment,muttrcUnHighlightSpace 392" Now for the structure of the color index line 393syn match muttrcPatternNL contained skipwhite skipnl "\s*\\$" nextgroup=muttrcPattern,muttrcPatternNL 394syn match muttrcColorBGI contained skipwhite /\s*[$]\?\w\+\s*/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcPattern,muttrcPatternNL 395syn match muttrcColorBGNLI contained skipwhite skipnl "\s*\\$" nextgroup=muttrcColorBGI,muttrcColorBGNLI 396syn match muttrcColorFGI contained skipwhite /\s*[$]\?\w\+/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcColorBGI,muttrcColorBGNLI 397syn match muttrcColorFGNLI contained skipwhite skipnl "\s*\\$" nextgroup=muttrcColorFGI,muttrcColorFGNLI 398syn match muttrcColorContextI contained skipwhite /\s*index/ contains=muttrcUnHighlightSpace nextgroup=muttrcColorFGI,muttrcColorFGNLI 399syn match muttrcColorNLI contained skipwhite skipnl "\s*\\$" nextgroup=muttrcColorContextI,muttrcColorNLI 400syn match muttrcColorKeywordI contained skipwhite /^\s*color\s\+/ nextgroup=muttrcColorContextI,muttrcColorNLI 401syn region muttrcColorLine keepend start=/^\s*color\s\+index/ skip=+\\$+ end=+$+ contains=muttrcColorKeywordI,muttrcComment,muttrcUnHighlightSpace 402" And now color's brother: 403syn region muttrcUnColorPatterns contained skipwhite start=+\s*'+ end=+'+ skip=+\\'+ contains=muttrcPattern nextgroup=muttrcUnColorPatterns,muttrcUnColorPatNL 404syn region muttrcUnColorPatterns contained skipwhite start=+\s*"+ end=+"+ skip=+\\"+ contains=muttrcPattern nextgroup=muttrcUnColorPatterns,muttrcUnColorPatNL 405syn match muttrcUnColorPatterns contained skipwhite /\s*[^'"\s]\S\*/ contains=muttrcPattern nextgroup=muttrcUnColorPatterns,muttrcUnColorPatNL 406syn match muttrcUnColorPatNL contained skipwhite skipnl /\s*\\$/ nextgroup=muttrcUnColorPatterns,muttrcUnColorPatNL 407syn match muttrcUnColorAll contained skipwhite /[*]/ 408syn match muttrcUnColorAPNL contained skipwhite skipnl /\s*\\$/ nextgroup=muttrcUnColorPatterns,muttrcUnColorAll,muttrcUnColorAPNL 409syn match muttrcUnColorIndex contained skipwhite /\s*index\s\+/ nextgroup=muttrcUnColorPatterns,muttrcUnColorAll,muttrcUnColorAPNL 410syn match muttrcUnColorIndexNL contained skipwhite skipnl /\s*\\$/ nextgroup=muttrcUnColorIndex,muttrcUnColorIndexNL 411syn match muttrcUnColorKeyword contained skipwhite /^\s*uncolor\s\+/ nextgroup=muttrcUnColorIndex,muttrcUnColorIndexNL 412syn region muttrcUnColorLine keepend start=+^\s*uncolor\s+ skip=+\\$+ end=+$+ contains=muttrcUnColorKeyword,muttrcComment,muttrcUnHighlightSpace 413 414" Mono are almost like color (ojects inherited from color) 415syn keyword muttrcMonoAttrib contained bold none normal reverse standout underline 416syn keyword muttrcMono contained mono skipwhite nextgroup=muttrcColorField 417syn match muttrcMonoLine "^\s*mono\s\+\S\+" skipwhite nextgroup=muttrcMonoAttrib contains=muttrcMono 418 419" Define the default highlighting. 420" For version 5.7 and earlier: only when not done already 421" For version 5.8 and later: only when an item doesn't have highlighting yet 422if version >= 508 || !exists("did_muttrc_syntax_inits") 423 if version < 508 424 let did_muttrc_syntax_inits = 1 425 command -nargs=+ HiLink hi link <args> 426 else 427 command -nargs=+ HiLink hi def link <args> 428 endif 429 430 HiLink muttrcComment Comment 431 HiLink muttrcEscape SpecialChar 432 HiLink muttrcRXChars SpecialChar 433 HiLink muttrcString String 434 HiLink muttrcRXString String 435 HiLink muttrcSpecial Special 436 HiLink muttrcGroupFlag Type 437 HiLink muttrcGroupDef Macro 438 HiLink muttrcAddrDef muttrcGroupFlag 439 HiLink muttrcRXDef muttrcGroupFlag 440 HiLink muttrcRXPat String 441 HiLink muttrcAliasGroupName Macro 442 HiLink muttrcAliasAbbr Identifier 443 HiLink muttrcUnAliasAbbr Identifier 444 HiLink muttrcAliasEncEmail Identifier 445 HiLink muttrcAliasParens Type 446 HiLink muttrcNumber Number 447 HiLink muttrcQuadopt Boolean 448 HiLink muttrcEmail Special 449 HiLink muttrcVariable Special 450 HiLink muttrcHeader Type 451 HiLink muttrcKeySpecial SpecialChar 452 HiLink muttrcKey Type 453 HiLink muttrcKeyName SpecialChar 454 HiLink muttrcVarBool Identifier 455 HiLink muttrcVarQuad Identifier 456 HiLink muttrcVarNum Identifier 457 HiLink muttrcVarStr Identifier 458 HiLink muttrcMenu Identifier 459 HiLink muttrcCommand Keyword 460 HiLink muttrcSet Keyword 461 HiLink muttrcUnset muttrcCommand 462 HiLink muttrcReset muttrcCommand 463 HiLink muttrcToggle muttrcCommand 464 HiLink muttrcBind muttrcCommand 465 HiLink muttrcMacro muttrcCommand 466 HiLink muttrcAlias muttrcCommand 467 HiLink muttrcUnAlias muttrcCommand 468 HiLink muttrcAction Macro 469 HiLink muttrcBadAction Error 470 HiLink muttrcBindFunction Error 471 HiLink muttrcBindMenuList Error 472 HiLink muttrcFunction Macro 473 HiLink muttrcGroupKeyword muttrcCommand 474 HiLink muttrcGroupLine Error 475 HiLink muttrcSubscribeKeyword muttrcCommand 476 HiLink muttrcSubscribeLine Error 477 HiLink muttrcListsKeyword muttrcCommand 478 HiLink muttrcListsLine Error 479 HiLink muttrcAlternateKeyword muttrcCommand 480 HiLink muttrcAlternatesLine Error 481 HiLink muttrcAttachmentsLine muttrcCommand 482 HiLink muttrcAttachmentsFlag Type 483 HiLink muttrcAttachmentsMimeType String 484 HiLink muttrcColorLine Error 485 HiLink muttrcColorContext Error 486 HiLink muttrcColorContextI Identifier 487 HiLink muttrcColorKeyword muttrcCommand 488 HiLink muttrcColorKeywordI muttrcColorKeyword 489 HiLink muttrcColorField Identifier 490 HiLink muttrcColor String 491 HiLink muttrcColorFG Error 492 HiLink muttrcColorFGI Error 493 HiLink muttrcColorBG Error 494 HiLink muttrcColorBGI Error 495 HiLink muttrcMonoAttrib muttrcColor 496 HiLink muttrcMono muttrcCommand 497 HiLink muttrcSimplePat Identifier 498 HiLink muttrcSimplePatGroup Macro 499 HiLink muttrcSimplePatMetas Special 500 HiLink muttrcPattern Type 501 HiLink muttrcPatternInner Error 502 HiLink muttrcUnColorLine Error 503 HiLink muttrcUnColorKeyword muttrcCommand 504 HiLink muttrcUnColorIndex Identifier 505 HiLink muttrcShellString muttrcEscape 506 HiLink muttrcRXHooks muttrcCommand 507 HiLink muttrcRXHookNot Type 508 HiLink muttrcPatHooks muttrcCommand 509 HiLink muttrcPatHookNot Type 510 511 delcommand HiLink 512endif 513 514let b:current_syntax = "muttrc" 515 516"EOF vim: ts=8 noet tw=100 sw=8 sts=0 517