neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

neomuttrc.vim (72329B)


      1 " Vim syntax file
      2 " Language:	NeoMutt setup files
      3 " Maintainer:	Richard Russon <rich@flatcap.org>
      4 " Previous Maintainer:	Guillaume Brogi <gui-gui@netcourrier.com>
      5 " Last Change:	2024 Oct 12
      6 " Original version based on syntax/muttrc.vim
      7 
      8 " This file covers NeoMutt 2024-10-02
      9 
     10 " quit when a syntax file was already loaded
     11 if exists("b:current_syntax")
     12  finish
     13 endif
     14 
     15 let s:cpo_save = &cpo
     16 set cpo&vim
     17 
     18 " Set the keyword characters
     19 setlocal isk=@,48-57,_,-
     20 
     21 " handling optional variables
     22 syntax match muttrcComment	"^# .*$" contains=@Spell
     23 syntax match muttrcComment	"^#[^ ].*$"
     24 syntax match muttrcComment	"^#$"
     25 syntax match muttrcComment	"[^\\]#.*$"lc=1 contains=@Spell
     26 
     27 " Escape sequences (back-tick and pipe goes here too)
     28 syntax match muttrcEscape	+\\[#tnr"'Cc ]+
     29 syntax match muttrcEscape	+[`|]+
     30 syntax match muttrcEscape	+\\$+
     31 
     32 " The variables takes the following arguments
     33 syntax region muttrcString	contained keepend start=+"+ms=e skip=+\\"+ end=+"+ contains=muttrcEscape,muttrcCommand,muttrcAction,muttrcShellString
     34 syntax region muttrcString	contained keepend start=+'+ms=e skip=+\\'+ end=+'+ contains=muttrcEscape,muttrcCommand,muttrcAction
     35 syntax match muttrcStringNL	contained skipwhite skipnl "\s*\\$" nextgroup=muttrcString,muttrcStringNL
     36 
     37 syntax region muttrcShellString	matchgroup=muttrcEscape keepend start=+`+ skip=+\\`+ end=+`+ contains=muttrcVarString,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcCommand
     38 
     39 syntax match  muttrcRXChars	contained /[^\\][][.*?+]\+/hs=s+1
     40 syntax match  muttrcRXChars	contained /[][|()][.*?+]*/
     41 syntax match  muttrcRXChars	contained /['"]^/ms=s+1
     42 syntax match  muttrcRXChars	contained /$['"]/me=e-1
     43 syntax match  muttrcRXChars	contained /\\/
     44 " Why does muttrcRXString2 work with one \ when muttrcRXString requires two?
     45 syntax region muttrcRXString	contained skipwhite start=+'+ skip=+\\'+ end=+'+ contains=muttrcRXChars
     46 syntax region muttrcRXString	contained skipwhite start=+"+ skip=+\\"+ end=+"+ contains=muttrcRXChars
     47 syntax region muttrcRXString	contained skipwhite start=+[^	 "'^]+ skip=+\\\s+ end=+\s+re=e-1 contains=muttrcRXChars
     48 " For some reason, skip refuses to match backslashes here...
     49 syntax region muttrcRXString	contained matchgroup=muttrcRXChars skipwhite start=+\^+ end=+[^\\]\s+re=e-1 contains=muttrcRXChars
     50 syntax region muttrcRXString	contained matchgroup=muttrcRXChars skipwhite start=+\^+ end=+$\s+ contains=muttrcRXChars
     51 syntax region muttrcRXString2	contained skipwhite start=+'+ skip=+\'+ end=+'+ contains=muttrcRXChars
     52 syntax region muttrcRXString2	contained skipwhite start=+"+ skip=+\"+ end=+"+ contains=muttrcRXChars
     53 
     54 " these must be kept synchronized with muttrcRXString, but are intended for muttrcRXHooks
     55 syntax region muttrcRXHookString	contained keepend skipwhite start=+'+ skip=+\\'+ end=+'+ contains=muttrcRXString nextgroup=muttrcString,muttrcStringNL
     56 syntax region muttrcRXHookString	contained keepend skipwhite start=+"+ skip=+\\"+ end=+"+ contains=muttrcRXString nextgroup=muttrcString,muttrcStringNL
     57 syntax region muttrcRXHookString	contained keepend skipwhite start=+[^	 "'^]+ skip=+\\\s+ end=+\s+re=e-1 contains=muttrcRXString nextgroup=muttrcString,muttrcStringNL
     58 syntax region muttrcRXHookString	contained keepend skipwhite start=+\^+ end=+[^\\]\s+re=e-1 contains=muttrcRXString nextgroup=muttrcString,muttrcStringNL
     59 syntax region muttrcRXHookString	contained keepend matchgroup=muttrcRXChars skipwhite start=+\^+ end=+$\s+ contains=muttrcRXString nextgroup=muttrcString,muttrcStringNL
     60 syntax match muttrcRXHookStringNL	contained skipwhite skipnl "\s*\\$" nextgroup=muttrcRXHookString,muttrcRXHookStringNL
     61 
     62 " these are exclusively for args lists (e.g. -rx pat pat pat ...)
     63 syntax region muttrcRXPat	contained keepend skipwhite start=+'+ skip=+\\'+ end=+'\s*+ contains=muttrcRXString nextgroup=muttrcRXPat
     64 syntax region muttrcRXPat	contained keepend skipwhite start=+"+ skip=+\\"+ end=+"\s*+ contains=muttrcRXString nextgroup=muttrcRXPat
     65 syntax match muttrcRXPat	contained /[^-'"#!]\S\+/ skipwhite contains=muttrcRXChars nextgroup=muttrcRXPat
     66 syntax match muttrcRXDef	contained "-rx\s\+" skipwhite nextgroup=muttrcRXPat
     67 
     68 syntax match muttrcSpecial	+\(['"]\)!\1+
     69 
     70 syntax match muttrcSetStrAssignment  contained skipwhite /=\s*\%(\\\?\$\)\?[0-9A-Za-z_-]\+/hs=s+1       nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString contains=muttrcVariable,muttrcEscapedVariable
     71 syntax region muttrcSetStrAssignment contained skipwhite keepend start=+=\s*"+hs=s+1 end=+"+ skip=+\\"+ nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString contains=muttrcString
     72 syntax region muttrcSetStrAssignment contained skipwhite keepend start=+=\s*'+hs=s+1 end=+'+ skip=+\\'+ nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString contains=muttrcString
     73 syntax match muttrcSetBoolAssignment contained skipwhite /=\s*\\\?\$\w\+/hs=s+1                         nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString contains=muttrcVariable,muttrcEscapedVariable
     74 syntax match muttrcSetBoolAssignment contained skipwhite /=\s*\%(yes\|no\)/hs=s+1                       nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
     75 syntax match muttrcSetBoolAssignment contained skipwhite /=\s*"\%(yes\|no\)"/hs=s+1                     nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
     76 syntax match muttrcSetBoolAssignment contained skipwhite /=\s*'\%(yes\|no\)'/hs=s+1                     nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
     77 syntax match muttrcSetQuadAssignment contained skipwhite /=\s*\\\?\$\w\+/hs=s+1                         nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString contains=muttrcVariable,muttrcEscapedVariable
     78 syntax match muttrcSetQuadAssignment contained skipwhite /=\s*\%(ask-\)\?\%(yes\|no\)/hs=s+1            nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
     79 syntax match muttrcSetQuadAssignment contained skipwhite /=\s*"\%(ask-\)\?\%(yes\|no\)"/hs=s+1          nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
     80 syntax match muttrcSetQuadAssignment contained skipwhite /=\s*'\%(ask-\)\?\%(yes\|no\)'/hs=s+1          nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
     81 syntax match muttrcSetNumAssignment  contained skipwhite /=\s*\\\?\$\w\+/hs=s+1                         nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString contains=muttrcVariable,muttrcEscapedVariable
     82 syntax match muttrcSetNumAssignment  contained skipwhite /=\s*\d\+/hs=s+1                               nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
     83 syntax match muttrcSetNumAssignment  contained skipwhite /=\s*"\d\+"/hs=s+1                             nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
     84 syntax match muttrcSetNumAssignment  contained skipwhite /=\s*'\d\+'/hs=s+1                             nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
     85 
     86 " Now catch some email addresses and headers (purified version from mail.vim)
     87 syntax match muttrcEmail	"[a-zA-Z0-9._-]\+@[a-zA-Z0-9./-]\+"
     88 syntax match muttrcHeader	"\<\c\%(From\|To\|C[Cc]\|B[Cc][Cc]\|Reply-To\|Subject\|Return-Path\|Received\|Date\|Replied\|Attach\)\>:\="
     89 
     90 syntax match   muttrcKeySpecial	contained +\%(\\[Cc'"]\|\^\|\\[01]\d\{2}\)+
     91 syntax match   muttrcKey	contained "\S\+"			contains=muttrcKeySpecial,muttrcKeyName
     92 syntax region  muttrcKey	contained start=+"+ skip=+\\\\\|\\"+ end=+"+	contains=muttrcKeySpecial,muttrcKeyName
     93 syntax region  muttrcKey	contained start=+'+ skip=+\\\\\|\\'+ end=+'+	contains=muttrcKeySpecial,muttrcKeyName
     94 syntax match   muttrcKeyName	contained "\\[trne]"
     95 syntax match   muttrcKeyName	contained "\c<\%(BackSpace\|BackTab\|Delete\|Down\|End\|Enter\|Esc\|Home\|Insert\|Left\|Next\|PageDown\|PageUp\|Return\|Right\|Space\|Tab\|Up\)>"
     96 syntax match   muttrcKeyName	contained "\c<F\d\+>"
     97 
     98 syntax match muttrcFormatErrors contained /%./
     99 
    100 syntax match muttrcStrftimeEscapes contained /%[AaBbCcDdeFGgHhIjklMmnpRrSsTtUuVvWwXxYyZz+%]/
    101 syntax match muttrcStrftimeEscapes contained /%E[cCxXyY]/
    102 syntax match muttrcStrftimeEscapes contained /%O[BdeHImMSuUVwWy]/
    103 
    104 " Defines syntax matches for muttrc[baseName]Escapes, muttrc[baseName]Conditionals
    105 " If padding==1, also match `%>` `%|` `%*` expandos
    106 " If conditional==1, some expandos support %X? format
    107 syntax match muttrcFormatConditionals2 contained /[^?]*?/
    108 function! s:escapesConditionals(baseName, sequence, padding, conditional)
    109 exec 'syntax match muttrc' . a:baseName . 'Escapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?\%(' . a:sequence . '\|%\)/'
    110 if a:padding
    111 	exec 'syntax match muttrc' . a:baseName . 'Escapes contained /%[>|*]./'
    112 endif
    113 if a:conditional
    114 	exec 'syntax match muttrc' . a:baseName . 'Conditionals contained /%?\%(' . a:sequence . '\)?/ nextgroup=muttrcFormatConditionals2'
    115 else
    116 	exec 'syntax match muttrc' . a:baseName . 'Conditionals contained /%?\%(' . a:sequence . '\)?/'
    117 endif
    118 endfunction
    119 
    120 " CHECKED 2024 Oct 12
    121 " Ref: AliasFormatDef in alias/config.c
    122 call s:escapesConditionals('AliasFormat', '[acfnrtY]', 1, 0)
    123 " Ref: AttachFormatDef in mutt_config.c
    124 call s:escapesConditionals('AttachFormat', '[CcDdeFfIMmnQsTtuX]', 1, 1)
    125 " Ref: AutocryptFormatDef in autocrypt/config.c
    126 call s:escapesConditionals('AutocryptFormat', '[aknps]', 1, 0)
    127 " Ref: ComposeFormatDef in compose/config.c
    128 call s:escapesConditionals('ComposeFormat', '[ahlv]', 1, 1)
    129 " Ref: FolderFormatDef in browser/config.c
    130 call s:escapesConditionals('FolderFormat', '[aCDdFfgilmNnpstu[]', 1, 1)
    131 " Ref: GreetingFormatDef in send/config.c
    132 call s:escapesConditionals('GreetingFormat', '[nuv]', 0, 0)
    133 " Ref: GroupIndexFormatDef in browser/config.c
    134 call s:escapesConditionals('GroupIndexFormat', '[aCdfMNnps]', 1, 0)
    135 " Ref: HistoryFormatDef in history/config.c
    136 call s:escapesConditionals('HistoryFormat', '[Cs]', 1, 0)
    137 " Ref: IndexFormatDef in mutt_config.c
    138 call s:escapesConditionals('IndexFormat', '[AaBbCDdEefgHIiJKLlMmNnOPqRrSsTtuvWXxYyZ(<[{]\|@\i\+@\|G[a-zA-Z]\+\|Fp\=\|z[cst]\|cr\=', 1, 1)
    139 " Ref: PatternFormatDef in pattern/config.c
    140 call s:escapesConditionals('PatternFormat', '[den]', 1, 0)
    141 " Ref: PgpCommandFormatDef in ncrypt/config.c
    142 call s:escapesConditionals('PgpCommandFormat', '[afprs]', 0, 1)
    143 " Ref: PgpEntryFormatDef in ncrypt/config.c
    144 call s:escapesConditionals('PgpEntryFormat', '[AaCcFfIiKkLlnptu[]', 1, 1)
    145 " Ref: QueryFormatDef in alias/config.c
    146 call s:escapesConditionals('QueryFormat', '[acentY]', 1, 1)
    147 " Ref: SidebarFormatDef in sidebar/config.c
    148 call s:escapesConditionals('SidebarFormat', '[!aBDdFLNnoprStZ]', 1, 1)
    149 " Ref: SmimeCommandFormatDef in ncrypt/config.c
    150 call s:escapesConditionals('SmimeCommandFormat', '[aCcdfiks]', 0, 1)
    151 " Ref: StatusFormatDef in mutt_config.c
    152 call s:escapesConditionals('StatusFormat', '[bDdFfhLlMmnoPpRrSsTtuVv]', 1, 1)
    153 
    154 syntax region muttrcAliasFormatString         contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcAliasFormatEscapes,muttrcAliasFormatConditionals,muttrcFormatErrors                                   nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    155 syntax region muttrcAliasFormatString         contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcAliasFormatEscapes,muttrcAliasFormatConditionals,muttrcFormatErrors                                   nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    156 syntax region muttrcAttachFormatString        contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcAttachFormatEscapes,muttrcAttachFormatConditionals,muttrcFormatErrors                                 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    157 syntax region muttrcAttachFormatString        contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcAttachFormatEscapes,muttrcAttachFormatConditionals,muttrcFormatErrors                                 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    158 syntax region muttrcAutocryptFormatString     contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcAutocryptFormatEscapes,muttrcAutocryptFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    159 syntax region muttrcAutocryptFormatString     contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcAutocryptFormatEscapes,muttrcAutocryptFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    160 syntax region muttrcComposeFormatString       contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcComposeFormatEscapes,muttrcComposeFormatConditionals,muttrcFormatErrors                               nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    161 syntax region muttrcComposeFormatString       contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcComposeFormatEscapes,muttrcComposeFormatConditionals,muttrcFormatErrors                               nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    162 syntax region muttrcFolderFormatString        contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcFolderFormatEscapes,muttrcFolderFormatConditionals,muttrcFormatErrors                                 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    163 syntax region muttrcFolderFormatString        contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcFolderFormatEscapes,muttrcFolderFormatConditionals,muttrcFormatErrors                                 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    164 syntax region muttrcGreetingFormatString      contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcGreetingFormatEscapes,muttrcGreetingFormatConditionals,muttrcFormatErrors                             nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    165 syntax region muttrcGreetingFormatString      contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcGreetingFormatEscapes,muttrcGreetingFormatConditionals,muttrcFormatErrors                             nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    166 syntax region muttrcGroupIndexFormatString    contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcGroupIndexFormatEscapes,muttrcGroupIndexFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes       nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    167 syntax region muttrcGroupIndexFormatString    contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcGroupIndexFormatEscapes,muttrcGroupIndexFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes       nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    168 syntax region muttrcHistoryFormatString       contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcHistoryFormatEscapes,muttrcHistoryFormatConditionals,muttrcFormatErrors                               nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    169 syntax region muttrcHistoryFormatString       contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcHistoryFormatEscapes,muttrcHistoryFormatConditionals,muttrcFormatErrors                               nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    170 syntax region muttrcIndexFormatString         contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcIndexFormatEscapes,muttrcIndexFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes                 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    171 syntax region muttrcIndexFormatString         contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcIndexFormatEscapes,muttrcIndexFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes                 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    172 syntax region muttrcPatternFormatString       contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPatternFormatEscapes,muttrcPatternFormatConditionals,muttrcFormatErrors                               nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    173 syntax region muttrcPatternFormatString       contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPatternFormatEscapes,muttrcPatternFormatConditionals,muttrcFormatErrors                               nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    174 syntax region muttrcPgpCommandFormatString    contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPgpCommandFormatEscapes,muttrcPgpCommandFormatConditionals,muttrcVariable,muttrcFormatErrors          nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    175 syntax region muttrcPgpCommandFormatString    contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPgpCommandFormatEscapes,muttrcPgpCommandFormatConditionals,muttrcVariable,muttrcFormatErrors          nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    176 syntax region muttrcPgpEntryFormatString      contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPgpEntryFormatEscapes,muttrcPgpEntryFormatConditionals,muttrcFormatErrors,muttrcPgpTimeEscapes        nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    177 syntax region muttrcPgpEntryFormatString      contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPgpEntryFormatEscapes,muttrcPgpEntryFormatConditionals,muttrcFormatErrors,muttrcPgpTimeEscapes        nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    178 syntax region muttrcQueryFormatString         contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcQueryFormatEscapes,muttrcQueryFormatConditionals,muttrcFormatErrors                                   nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    179 syntax region muttrcQueryFormatString         contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcQueryFormatEscapes,muttrcQueryFormatConditionals,muttrcFormatErrors                                   nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    180 syntax region muttrcSidebarFormatString       contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcSidebarFormatEscapes,muttrcSidebarFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes             nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    181 syntax region muttrcSidebarFormatString       contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcSidebarFormatEscapes,muttrcSidebarFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes             nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    182 syntax region muttrcSmimeCommandFormatString  contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcSmimeCommandFormatEscapes,muttrcSmimeCommandFormatConditionals,muttrcVariable,muttrcFormatErrors      nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    183 syntax region muttrcSmimeCommandFormatString  contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcSmimeCommandFormatEscapes,muttrcSmimeCommandFormatConditionals,muttrcVariable,muttrcFormatErrors      nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    184 syntax region muttrcStatusFormatString        contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcStatusFormatEscapes,muttrcStatusFormatConditionals,muttrcFormatErrors                                 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    185 syntax region muttrcStatusFormatString        contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcStatusFormatEscapes,muttrcStatusFormatConditionals,muttrcFormatErrors                                 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    186 syntax region muttrcStrftimeFormatString      contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcStrftimeEscapes,muttrcFormatErrors                                                                    nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    187 syntax region muttrcStrftimeFormatString      contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcStrftimeEscapes,muttrcFormatErrors                                                                    nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    188 
    189 " Format escapes and conditionals
    190 syntax match muttrcFormatConditionals2 contained /[^?]*?/
    191 
    192 syntax region muttrcPgpTimeEscapes contained start=+%\[+ end=+\]+ contains=muttrcStrftimeEscapes
    193 syntax region muttrcTimeEscapes    contained start=+%(+  end=+)+  contains=muttrcStrftimeEscapes
    194 syntax region muttrcTimeEscapes    contained start=+%<+  end=+>+  contains=muttrcStrftimeEscapes
    195 syntax region muttrcTimeEscapes    contained start=+%\[+ end=+\]+ contains=muttrcStrftimeEscapes
    196 syntax region muttrcTimeEscapes    contained start=+%{+  end=+}+  contains=muttrcStrftimeEscapes
    197 
    198 syntax match muttrcVarEqualsAliasFormat         contained skipwhite "=" nextgroup=muttrcAliasFormatString
    199 syntax match muttrcVarEqualsAttachFormat        contained skipwhite "=" nextgroup=muttrcAttachFormatString
    200 syntax match muttrcVarEqualsAutocryptFormat     contained skipwhite "=" nextgroup=muttrcAutocryptFormatString
    201 syntax match muttrcVarEqualsComposeFormat       contained skipwhite "=" nextgroup=muttrcComposeFormatString
    202 syntax match muttrcVarEqualsFolderFormat        contained skipwhite "=" nextgroup=muttrcFolderFormatString
    203 syntax match muttrcVarEqualsGreetingFormat      contained skipwhite "=" nextgroup=muttrcGreetingFormatString
    204 syntax match muttrcVarEqualsGroupIndexFormat    contained skipwhite "=" nextgroup=muttrcGroupIndexFormatString
    205 syntax match muttrcVarEqualsHistoryFormat       contained skipwhite "=" nextgroup=muttrcHistoryFormatString
    206 syntax match muttrcVarEqualsIndexFormat         contained skipwhite "=" nextgroup=muttrcIndexFormatString
    207 syntax match muttrcVarEqualsPatternFormat       contained skipwhite "=" nextgroup=muttrcPatternFormatString
    208 syntax match muttrcVarEqualsPgpCommandFormat    contained skipwhite "=" nextgroup=muttrcPgpCommandFormatString
    209 syntax match muttrcVarEqualsPgpEntryFormat      contained skipwhite "=" nextgroup=muttrcPgpEntryFormatString
    210 syntax match muttrcVarEqualsQueryFormat         contained skipwhite "=" nextgroup=muttrcQueryFormatString
    211 syntax match muttrcVarEqualsSidebarFormat       contained skipwhite "=" nextgroup=muttrcSidebarFormatString
    212 syntax match muttrcVarEqualsSmimeCommandFormat  contained skipwhite "=" nextgroup=muttrcSmimeCommandFormatString
    213 syntax match muttrcVarEqualsStatusFormat        contained skipwhite "=" nextgroup=muttrcStatusFormatString
    214 syntax match muttrcVarEqualsStrftimeFormat      contained skipwhite "=" nextgroup=muttrcStrftimeFormatString
    215 
    216 syntax match muttrcVPrefix contained /[?&]/ nextgroup=muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    217 
    218 " CHECKED 2024 Oct 12
    219 " List of the different screens in NeoMutt (see MenuNames in menu/type.c)
    220 syntax keyword muttrcMenu contained alias attach autocrypt browser compose dialog editor generic index key_select_pgp key_select_smime pager pgp postpone query smime
    221 syntax match muttrcMenuList "\S\+" contained contains=muttrcMenu
    222 syntax match muttrcMenuCommas /,/ contained
    223 
    224 syntax region muttrcSpamPattern	contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPattern nextgroup=muttrcString,muttrcStringNL
    225 syntax region muttrcSpamPattern	contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPattern nextgroup=muttrcString,muttrcStringNL
    226 
    227 syntax region muttrcNoSpamPattern	contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPattern
    228 syntax region muttrcNoSpamPattern	contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPattern
    229 
    230 syntax match muttrcAttachmentsMimeType contained "[*a-z0-9_-]\+/[*a-z0-9._-]\+\s*" skipwhite nextgroup=muttrcAttachmentsMimeType
    231 syntax match muttrcAttachmentsFlag contained "[+-]\%([AI]\|inline\|attachment\)\s\+" skipwhite nextgroup=muttrcAttachmentsMimeType
    232 syntax match muttrcAttachmentsLine "^\s*\%(un\)\?attachments\s\+" skipwhite nextgroup=muttrcAttachmentsFlag
    233 
    234 syntax match muttrcUnHighlightSpace contained "\%(\s\+\|\\$\)"
    235 
    236 syntax keyword muttrcAsterisk	contained *
    237 
    238 syntax keyword muttrcListsKeyword	lists skipwhite nextgroup=muttrcGroupDef,muttrcComment
    239 syntax keyword muttrcListsKeyword	unlists skipwhite nextgroup=muttrcAsterisk,muttrcComment
    240 
    241 syntax keyword muttrcSubscribeKeyword	subscribe skipwhite nextgroup=muttrcGroupDef,muttrcComment
    242 syntax keyword muttrcSubscribeKeyword	unsubscribe skipwhite nextgroup=muttrcAsterisk,muttrcComment
    243 
    244 syntax keyword muttrcAlternateKeyword contained alternates unalternates
    245 syntax region muttrcAlternatesLine keepend start=+^\s*\%(un\)\?alternates\s+ skip=+\\$+ end=+$+ contains=muttrcAlternateKeyword,muttrcGroupDef,muttrcRXPat,muttrcUnHighlightSpace,muttrcComment
    246 
    247 " muttrcVariable includes a prefix because partial strings are considered valid.
    248 syntax match muttrcVariable	contained "\\\@<![a-zA-Z_-]*\$[a-zA-Z_-]\+" contains=muttrcVariableInner
    249 syntax match muttrcVariableInner	contained "\$[a-zA-Z_-]\+"
    250 syntax match muttrcEscapedVariable	contained "\\\$[a-zA-Z_-]\+"
    251 
    252 syntax match muttrcBadAction	contained "[^<>]\+" contains=muttrcEmail
    253 syntax match muttrcAction		contained "<[^>]\{-}>" contains=muttrcBadAction,muttrcFunction,muttrcKeyName
    254 
    255 " CHECKED 2024 Oct 12
    256 " First, hooks that take regular expressions:
    257 syntax match  muttrcRXHookNot		contained /!\s*/ skipwhite nextgroup=muttrcRXHookString,muttrcRXHookStringNL
    258 syntax match  muttrcRXHookNoRegex	contained /-noregex/ skipwhite nextgroup=muttrcRXHookString,muttrcRXHookStringNL
    259 syntax match  muttrcRXHooks	/\<\%(account\|append\|close\|crypt\|open\|pgp\|shutdown\|startup\|timeout\)-hook\>/ skipwhite nextgroup=muttrcRXHookNot,muttrcRXHookString,muttrcRXHookStringNL
    260 syntax match  muttrcRXHooks	/\<\%(folder\|mbox\)-hook\>/ skipwhite nextgroup=muttrcRXHookNoRegex,muttrcRXHookNot,muttrcRXHookString,muttrcRXHookStringNL
    261 
    262 " Now, hooks that take patterns
    263 syntax match muttrcPatHookNot	contained /!\s*/ skipwhite nextgroup=muttrcPattern
    264 syntax match muttrcPatHooks	/\<\%(charset\|iconv\|index-format\)-hook\>/ skipwhite nextgroup=muttrcPatHookNot,muttrcPattern
    265 syntax match muttrcPatHooks	/\<\%(message\|reply\|send\|send2\|save\|fcc\|fcc-save\)-hook\>/ skipwhite nextgroup=muttrcPatHookNot,muttrcOptPattern
    266 
    267 " Global hooks that take a command
    268 syntax keyword muttrcHooks skipwhite shutdown-hook startup-hook timeout-hook nextgroup=muttrcCommand
    269 
    270 syntax match muttrcBindFunction		contained /\S\+\>/ skipwhite contains=muttrcFunction
    271 syntax match muttrcBindFunctionNL	contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcBindFunction,muttrcBindFunctionNL
    272 syntax match muttrcBindKey		contained /\S\+/   skipwhite contains=muttrcKey nextgroup=muttrcBindFunction,muttrcBindFunctionNL
    273 syntax match muttrcBindKeyNL		contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcBindKey,muttrcBindKeyNL
    274 syntax match muttrcBindMenuList		contained /\S\+/   skipwhite contains=muttrcMenu,muttrcMenuCommas nextgroup=muttrcBindKey,muttrcBindKeyNL
    275 syntax match muttrcBindMenuListNL	contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcBindMenuList,muttrcBindMenuListNL
    276 
    277 syntax region muttrcMacroDescr	contained keepend skipwhite start=+\s*\S+ms=e skip=+\\ + end=+ \|$+me=s
    278 syntax region muttrcMacroDescr	contained keepend skipwhite start=+'+ms=e skip=+\\'+ end=+'+me=s
    279 syntax region muttrcMacroDescr	contained keepend skipwhite start=+"+ms=e skip=+\\"+ end=+"+me=s
    280 syntax match muttrcMacroDescrNL	contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcMacroDescr,muttrcMacroDescrNL
    281 syntax region muttrcMacroBody	contained skipwhite start="\S" skip='\\ \|\\$' end=' \|$' contains=muttrcEscape,muttrcSet,muttrcUnset,muttrcReset,muttrcToggle,muttrcCommand,muttrcAction nextgroup=muttrcMacroDescr,muttrcMacroDescrNL
    282 syntax region muttrcMacroBody	matchgroup=Type contained skipwhite start=+'+ms=e skip=+\\'+ end=+'\|\%(\%(\\\\\)\@<!$\)+me=s contains=muttrcEscape,muttrcSet,muttrcUnset,muttrcReset,muttrcToggle,muttrcSpam,muttrcNoSpam,muttrcCommand,muttrcAction,muttrcVariable nextgroup=muttrcMacroDescr,muttrcMacroDescrNL
    283 syntax region muttrcMacroBody	matchgroup=Type contained skipwhite start=+"+ms=e skip=+\\"+ end=+"\|\%(\%(\\\\\)\@<!$\)+me=s contains=muttrcEscape,muttrcSet,muttrcUnset,muttrcReset,muttrcToggle,muttrcSpam,muttrcNoSpam,muttrcCommand,muttrcAction,muttrcVariable nextgroup=muttrcMacroDescr,muttrcMacroDescrNL
    284 syntax match muttrcMacroBodyNL	contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcMacroBody,muttrcMacroBodyNL
    285 syntax match muttrcMacroKey	contained /\S\+/ skipwhite contains=muttrcKey nextgroup=muttrcMacroBody,muttrcMacroBodyNL
    286 syntax match muttrcMacroKeyNL	contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcMacroKey,muttrcMacroKeyNL
    287 syntax match muttrcMacroMenuList	contained /\S\+/ skipwhite contains=muttrcMenu,muttrcMenuCommas nextgroup=muttrcMacroKey,muttrcMacroKeyNL
    288 syntax match muttrcMacroMenuListNL	contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcMacroMenuList,muttrcMacroMenuListNL
    289 
    290 syntax match muttrcAddrContent	contained "[a-zA-Z0-9._-]\+@[a-zA-Z0-9./-]\+\s*" skipwhite contains=muttrcEmail nextgroup=muttrcAddrContent
    291 syntax region muttrcAddrContent	contained start=+'+ end=+'\s*+ skip=+\\'+ skipwhite contains=muttrcEmail nextgroup=muttrcAddrContent
    292 syntax region muttrcAddrContent	contained start=+"+ end=+"\s*+ skip=+\\"+ skipwhite contains=muttrcEmail nextgroup=muttrcAddrContent
    293 syntax match muttrcAddrDef	contained "-addr\s\+" skipwhite nextgroup=muttrcAddrContent
    294 
    295 syntax match muttrcGroupFlag	contained "-group"
    296 syntax region muttrcGroupDef	contained start="-group\s\+" skip="\\$" end="\s" skipwhite keepend contains=muttrcGroupFlag,muttrcUnHighlightSpace
    297 
    298 syntax keyword muttrcGroupKeyword	contained group ungroup
    299 syntax region muttrcGroupLine	keepend start=+^\s*\%(un\)\?group\s+ skip=+\\$+ end=+$+ contains=muttrcGroupKeyword,muttrcGroupDef,muttrcAddrDef,muttrcRXDef,muttrcUnHighlightSpace,muttrcComment
    300 
    301 syntax match muttrcAliasGroupName	contained /\w\+/ skipwhite nextgroup=muttrcAliasGroupDef,muttrcAliasKey,muttrcAliasNL
    302 syntax match muttrcAliasGroupDefNL	contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasGroupName,muttrcAliasGroupDefNL
    303 syntax match muttrcAliasGroupDef	contained /\s*-group/ skipwhite nextgroup=muttrcAliasGroupName,muttrcAliasGroupDefNL contains=muttrcGroupFlag
    304 syntax match muttrcAliasComma	contained /,/ skipwhite nextgroup=muttrcAliasEmail,muttrcAliasEncEmail,muttrcAliasNameNoParens,muttrcAliasENNL
    305 syntax match muttrcAliasEmail	contained /\S\+@\S\+/ contains=muttrcEmail nextgroup=muttrcAliasName,muttrcAliasNameNL skipwhite
    306 syntax match muttrcAliasEncEmail	contained /<[^>]\+>/ contains=muttrcEmail nextgroup=muttrcAliasComma
    307 syntax match muttrcAliasEncEmailNL	contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasEncEmail,muttrcAliasEncEmailNL
    308 syntax match muttrcAliasNameNoParens contained /[^<(@]\+\s\+/ nextgroup=muttrcAliasEncEmail,muttrcAliasEncEmailNL
    309 syntax region muttrcAliasName	contained matchgroup=Type start=/(/ end=/)/ skipwhite
    310 syntax match muttrcAliasNameNL	contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasName,muttrcAliasNameNL
    311 syntax match muttrcAliasENNL	contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasEmail,muttrcAliasEncEmail,muttrcAliasNameNoParens,muttrcAliasENNL
    312 syntax match muttrcAliasKey	contained /\s*[^- \t]\S\+/ skipwhite nextgroup=muttrcAliasEmail,muttrcAliasEncEmail,muttrcAliasNameNoParens,muttrcAliasENNL
    313 syntax match muttrcAliasNL		contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasGroupDef,muttrcAliasKey,muttrcAliasNL
    314 
    315 syntax match muttrcUnAliasKey	contained "\s*\w\+\s*" skipwhite nextgroup=muttrcUnAliasKey,muttrcUnAliasNL
    316 syntax match muttrcUnAliasNL	contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcUnAliasKey,muttrcUnAliasNL
    317 
    318 " CHECKED 2024 Oct 12
    319 " List of letters in Flags in pattern/flags.c
    320 " Parameter: none
    321 syntax match muttrcSimplePat contained "!\?\^\?[~][ADEFGgklNOPpQRSTUuVv#$=]"
    322 " Parameter: range
    323 syntax match muttrcSimplePat contained "!\?\^\?[~][mnXz]\s*\%([<>-][0-9]\+[kM]\?\|[0-9]\+[kM]\?[-]\%([0-9]\+[kM]\?\)\?\)"
    324 " Parameter: date
    325 syntax 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
    326 " Parameter: regex
    327 syntax match muttrcSimplePat contained "!\?\^\?[~][BbCcefHhIiKLMstwxYy]\s*" nextgroup=muttrcSimplePatRXContainer
    328 " Parameter: pattern
    329 syntax match muttrcSimplePat contained "!\?\^\?[%][BbCcefHhiLstxy]\s*" nextgroup=muttrcSimplePatString
    330 " Parameter: pattern
    331 syntax match muttrcSimplePat contained "!\?\^\?[=][bcCefhHiLstxy]\s*" nextgroup=muttrcSimplePatString
    332 syntax region muttrcSimplePat contained keepend start=+!\?\^\?[~](+ end=+)+ contains=muttrcSimplePat
    333 
    334 "syn match muttrcSimplePat contained /'[^~=%][^']*/ contains=muttrcRXString
    335 syntax region muttrcSimplePatString contained keepend start=+"+ end=+"+ skip=+\\"+
    336 syntax region muttrcSimplePatString contained keepend start=+'+ end=+'+ skip=+\\'+
    337 syntax region muttrcSimplePatString contained keepend start=+[^	 "']+ skip=+\\ + end=+\s+re=e-1
    338 syntax region muttrcSimplePatRXContainer contained keepend start=+"+ end=+"+ skip=+\\"+ contains=muttrcRXString
    339 syntax region muttrcSimplePatRXContainer contained keepend start=+'+ end=+'+ skip=+\\'+ contains=muttrcRXString
    340 syntax region muttrcSimplePatRXContainer contained keepend start=+[^	 "']+ skip=+\\ + end=+\s+re=e-1 contains=muttrcRXString
    341 syntax match muttrcSimplePatMetas contained /[(|)]/
    342 
    343 syntax match muttrcOptSimplePat contained skipwhite /[~=%!(^].*/ contains=muttrcSimplePat,muttrcSimplePatMetas
    344 syntax match muttrcOptSimplePat contained skipwhite /[^~=%!(^].*/ contains=muttrcRXString
    345 syntax region muttrcOptPattern contained matchgroup=Type keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcOptSimplePat,muttrcUnHighlightSpace nextgroup=muttrcString,muttrcStringNL
    346 syntax region muttrcOptPattern contained matchgroup=Type keepend skipwhite start=+'+ skip=+\\'+ end=+'+ contains=muttrcOptSimplePat,muttrcUnHighlightSpace nextgroup=muttrcString,muttrcStringNL
    347 syntax region muttrcOptPattern contained keepend skipwhite start=+[~](+ end=+)+ skip=+\\)+ contains=muttrcSimplePat nextgroup=muttrcString,muttrcStringNL
    348 syntax match muttrcOptPattern contained skipwhite /[~][A-Za-z]/ contains=muttrcSimplePat nextgroup=muttrcString,muttrcStringNL
    349 syntax match muttrcOptPattern contained skipwhite /[.]/ nextgroup=muttrcString,muttrcStringNL
    350 " Keep muttrcPattern and muttrcOptPattern synchronized
    351 syntax region muttrcPattern contained matchgroup=Type keepend skipwhite start=+"+ skip=+\\"+ end=+"+ contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas
    352 syntax region muttrcPattern contained matchgroup=Type keepend skipwhite start=+'+ skip=+\\'+ end=+'+ contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas
    353 syntax region muttrcPattern contained keepend skipwhite start=+[~](+ end=+)+ skip=+\\)+ contains=muttrcSimplePat
    354 syntax match muttrcPattern contained skipwhite /[~][A-Za-z]/ contains=muttrcSimplePat
    355 syntax match muttrcPattern contained skipwhite /[.]/
    356 syntax region muttrcPatternInner contained keepend start=+"[~=%!(^]+ms=s+1 skip=+\\"+ end=+"+me=e-1 contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas
    357 syntax region muttrcPatternInner contained keepend start=+'[~=%!(^]+ms=s+1 skip=+\\'+ end=+'+me=e-1 contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas
    358 
    359 " Colour definitions takes object, foreground and background arguments (regexes excluded).
    360 syntax match muttrcColorMatchCount	contained "[0-9]\+"
    361 syntax match muttrcColorMatchCountNL contained skipwhite skipnl "\s*\\$" nextgroup=muttrcColorMatchCount,muttrcColorMatchCountNL
    362 syntax region muttrcColorRXPat	contained start=+\s*'+ skip=+\\'+ end=+'\s*+ keepend skipwhite contains=muttrcRXString2 nextgroup=muttrcColorMatchCount,muttrcColorMatchCountNL
    363 syntax region muttrcColorRXPat	contained start=+\s*"+ skip=+\\"+ end=+"\s*+ keepend skipwhite contains=muttrcRXString2 nextgroup=muttrcColorMatchCount,muttrcColorMatchCountNL
    364 syntax keyword muttrcColor	contained black blue cyan default green magenta red white yellow
    365 syntax keyword muttrcColor	contained brightblack brightblue brightcyan brightdefault brightgreen brightmagenta brightred brightwhite brightyellow
    366 syntax keyword muttrcColor	contained lightblack lightblue lightcyan lightdefault lightgreen lightmagenta lightred lightwhite lightyellow
    367 syntax keyword muttrcColor	contained alertblack alertblue alertcyan alertdefault alertgreen alertmagenta alertred alertwhite alertyellow
    368 syntax match   muttrcColor	contained "\<\%(bright\)\=color\d\{1,3}\>"
    369 syntax match   muttrcColor	contained "#[0-9a-fA-F]\{6}\>"
    370 
    371 " Now for the structure of the color line
    372 syntax match muttrcColorRXNL	contained skipnl "\s*\\$" nextgroup=muttrcColorRXPat,muttrcColorRXNL
    373 syntax match muttrcColorBG	contained /\s*[#$]\?\w\+/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcColorRXPat,muttrcColorRXNL
    374 syntax match muttrcColorBGNL	contained skipnl "\s*\\$" nextgroup=muttrcColorBG,muttrcColorBGNL
    375 syntax match muttrcColorFG	contained /\s*[#$]\?\w\+/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcColorBG,muttrcColorBGNL
    376 syntax match muttrcColorFGNL	contained skipnl "\s*\\$" nextgroup=muttrcColorFG,muttrcColorFGNL
    377 syntax match muttrcColorContext	contained /\s*[#$]\?\w\+/ contains=muttrcColorField,muttrcVariable,muttrcUnHighlightSpace,muttrcColorCompose nextgroup=muttrcColorFG,muttrcColorFGNL
    378 syntax match muttrcColorNL	contained skipnl "\s*\\$" nextgroup=muttrcColorContext,muttrcColorNL,muttrcColorCompose
    379 syntax match muttrcColorKeyword	contained /^\s*color\s\+/ nextgroup=muttrcColorContext,muttrcColorNL,muttrcColorCompose
    380 " And now color's brother:
    381 syntax region muttrcUnColorPatterns contained skipwhite start=+\s*'+ end=+'+ skip=+\\'+ contains=muttrcPattern nextgroup=muttrcUnColorPatterns,muttrcUnColorPatNL
    382 syntax region muttrcUnColorPatterns contained skipwhite start=+\s*"+ end=+"+ skip=+\\"+ contains=muttrcPattern nextgroup=muttrcUnColorPatterns,muttrcUnColorPatNL
    383 syntax match muttrcUnColorPatterns contained skipwhite /\s*[^'"\s]\S\*/ contains=muttrcPattern nextgroup=muttrcUnColorPatterns,muttrcUnColorPatNL
    384 syntax match muttrcUnColorPatNL	contained skipwhite skipnl /\s*\\$/ nextgroup=muttrcUnColorPatterns,muttrcUnColorPatNL
    385 syntax match muttrcUnColorAll	contained skipwhite /[*]/
    386 syntax match muttrcUnColorAPNL	contained skipwhite skipnl /\s*\\$/ nextgroup=muttrcUnColorPatterns,muttrcUnColorAll,muttrcUnColorAPNL
    387 syntax match muttrcUnColorIndex	contained skipwhite /\s*index\s\+/ nextgroup=muttrcUnColorPatterns,muttrcUnColorAll,muttrcUnColorAPNL
    388 syntax match muttrcUnColorIndexNL	contained skipwhite skipnl /\s*\\$/ nextgroup=muttrcUnColorIndex,muttrcUnColorIndexNL
    389 syntax match muttrcUnColorKeyword	contained skipwhite /^\s*uncolor\s\+/ nextgroup=muttrcUnColorIndex,muttrcUnColorIndexNL
    390 syntax region muttrcUnColorLine keepend start=+^\s*uncolor\s+ skip=+\\$+ end=+$+ contains=muttrcUnColorKeyword,muttrcComment,muttrcUnHighlightSpace
    391 
    392 syntax keyword muttrcMonoAttrib	contained bold italic none normal reverse standout underline
    393 syntax keyword muttrcMono	contained mono		skipwhite nextgroup=muttrcColorField,muttrcColorCompose
    394 syntax match   muttrcMonoLine	"^\s*mono\s\+\S\+"	skipwhite nextgroup=muttrcMonoAttrib contains=muttrcMono
    395 
    396 " CHECKED 2024 Oct 12
    397 " List of fields in ColorFields in color/command.c
    398 syntax keyword muttrcColorField skipwhite contained
    399 \ attachment attach_headers body bold error hdrdefault header index index_author
    400 \ index_collapsed index_date index_flags index_label index_number index_size index_subject
    401 \ index_tag index_tags indicator italic markers message normal options progress prompt
    402 \ search sidebar_background sidebar_divider sidebar_flagged sidebar_highlight
    403 \ sidebar_indicator sidebar_new sidebar_ordinary sidebar_spool_file sidebar_unread signature
    404 \ status stripe_even stripe_odd tilde tree underline warning
    405 \ nextgroup=muttrcColor
    406 
    407 syntax match   muttrcColorField	contained "\<quoted\d\=\>"
    408 
    409 syntax match muttrcColorCompose skipwhite contained /\s*compose\s*/ nextgroup=muttrcColorComposeField
    410 
    411 " CHECKED 2024 Oct 12
    412 " List of fields in ComposeColorFields in color/command.c
    413 syntax keyword muttrcColorComposeField skipwhite contained
    414 \ header security_both security_encrypt security_none security_sign
    415 \ nextgroup=muttrcColorFG,muttrcColorFGNL
    416 syntax region muttrcColorLine keepend start=/^\s*color\s\+/ skip=+\\$+ end=+$+ contains=muttrcColorKeyword,muttrcComment,muttrcUnHighlightSpace
    417 
    418 function! s:boolQuadGen(type, vars, deprecated)
    419 let l:novars = copy(a:vars)
    420 call map(l:novars, '"no" . v:val')
    421 let l:invvars = copy(a:vars)
    422 call map(l:invvars, '"inv" . v:val')
    423 
    424 let l:orig_type = copy(a:type)
    425 if a:deprecated
    426 	let l:type = 'Deprecated' . a:type
    427 	exec 'syntax keyword muttrcVar' . l:type . ' ' . join(a:vars)
    428 	exec 'syntax keyword muttrcVar' . l:type . ' ' . join(l:novars)
    429 	exec 'syntax keyword muttrcVar' . l:type . ' ' . join(l:invvars)
    430 else
    431 	let l:type = a:type
    432 	exec 'syntax keyword muttrcVar' . l:type . ' skipwhite contained ' . join(a:vars) . ' nextgroup=muttrcSet' . l:orig_type . 'Assignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString'
    433 	exec 'syntax keyword muttrcVar' . l:type . ' skipwhite contained ' . join(l:novars) . ' nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString'
    434 	exec 'syntax keyword muttrcVar' . l:type . ' skipwhite contained ' . join(l:invvars) . ' nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString'
    435 endif
    436 
    437 endfunction
    438 
    439 " CHECKED 2024 Oct 12
    440 " List of DT_BOOL in MuttVars in mutt_config.c
    441 call s:boolQuadGen('Bool', [
    442 \ 'abort_backspace', 'allow_8bit', 'allow_ansi', 'arrow_cursor', 'ascii_chars', 'ask_bcc',
    443 \ 'ask_cc', 'ask_followup_to', 'ask_x_comment_to', 'attach_save_without_prompting',
    444 \ 'attach_split', 'autocrypt', 'autocrypt_reply', 'auto_edit', 'auto_subscribe', 'auto_tag',
    445 \ 'beep', 'beep_new', 'bounce_delivered', 'braille_friendly',
    446 \ 'browser_abbreviate_mailboxes', 'browser_sort_dirs_first', 'change_folder_next',
    447 \ 'check_mbox_size', 'check_new', 'collapse_all', 'collapse_flagged', 'collapse_unread',
    448 \ 'color_directcolor', 'compose_confirm_detach_first', 'compose_show_user_headers',
    449 \ 'confirm_append', 'confirm_create', 'copy_decode_weed', 'count_alternatives',
    450 \ 'crypt_auto_encrypt', 'crypt_auto_pgp', 'crypt_auto_sign', 'crypt_auto_smime',
    451 \ 'crypt_confirm_hook', 'crypt_encryption_info', 'crypt_opportunistic_encrypt',
    452 \ 'crypt_opportunistic_encrypt_strong_keys', 'crypt_protected_headers_read',
    453 \ 'crypt_protected_headers_save', 'crypt_protected_headers_weed',
    454 \ 'crypt_protected_headers_write', 'crypt_reply_encrypt', 'crypt_reply_sign',
    455 \ 'crypt_reply_sign_encrypted', 'crypt_timestamp', 'crypt_use_gpgme', 'crypt_use_pka',
    456 \ 'delete_untag', 'digest_collapse', 'duplicate_threads', 'edit_headers', 'encode_from',
    457 \ 'fast_reply', 'fcc_before_send', 'fcc_clear', 'flag_safe', 'followup_to', 'force_name',
    458 \ 'forward_decode', 'forward_decrypt', 'forward_quote', 'forward_references', 'hdrs',
    459 \ 'header', 'header_color_partial', 'help', 'hidden_host', 'hide_limited', 'hide_missing',
    460 \ 'hide_thread_subject', 'hide_top_limited', 'hide_top_missing', 'history_remove_dups',
    461 \ 'honor_disposition', 'idn_decode', 'idn_encode', 'ignore_list_reply_to',
    462 \ 'imap_check_subscribed', 'imap_condstore', 'imap_deflate', 'imap_idle',
    463 \ 'imap_list_subscribed', 'imap_passive', 'imap_peek', 'imap_qresync', 'imap_rfc5161',
    464 \ 'imap_send_id', 'imap_server_noise', 'implicit_auto_view', 'include_encrypted',
    465 \ 'include_only_first', 'keep_flagged', 'local_date_header', 'mailcap_sanitize',
    466 \ 'maildir_check_cur', 'maildir_header_cache_verify', 'maildir_trash', 'mail_check_recent',
    467 \ 'mail_check_stats', 'markers', 'mark_old', 'menu_move_off', 'menu_scroll',
    468 \ 'message_cache_clean', 'meta_key', 'me_too', 'mh_purge', 'mime_forward_decode',
    469 \ 'mime_type_query_first', 'narrow_tree', 'nm_query_window_enable', 'nm_record',
    470 \ 'nntp_listgroup', 'nntp_load_description', 'pager_stop', 'pgp_auto_decode',
    471 \ 'pgp_auto_inline', 'pgp_check_exit', 'pgp_check_gpg_decrypt_status_fd',
    472 \ 'pgp_ignore_subkeys', 'pgp_long_ids', 'pgp_reply_inline', 'pgp_retainable_sigs',
    473 \ 'pgp_self_encrypt', 'pgp_show_unusable', 'pgp_strict_enc', 'pgp_use_gpg_agent',
    474 \ 'pipe_decode', 'pipe_decode_weed', 'pipe_split', 'pop_auth_try_all', 'pop_last',
    475 \ 'postpone_encrypt', 'print_decode', 'print_decode_weed', 'print_split', 'prompt_after',
    476 \ 'read_only', 'reflow_space_quotes', 'reflow_text', 'reply_self', 'reply_with_xorig',
    477 \ 'resolve', 'resume_draft_files', 'resume_edited_draft_files', 'reverse_alias',
    478 \ 'reverse_name', 'reverse_real_name', 'rfc2047_parameters', 'save_address', 'save_empty',
    479 \ 'save_name', 'save_unsubscribed', 'score', 'show_new_news', 'show_only_unread',
    480 \ 'sidebar_folder_indent', 'sidebar_new_mail_only', 'sidebar_next_new_wrap',
    481 \ 'sidebar_non_empty_mailbox_only', 'sidebar_on_right', 'sidebar_short_path',
    482 \ 'sidebar_visible', 'sig_dashes', 'sig_on_top', 'size_show_bytes', 'size_show_fractions',
    483 \ 'size_show_mb', 'size_units_on_left', 'smart_wrap', 'smime_ask_cert_label',
    484 \ 'smime_decrypt_use_default_key', 'smime_is_default', 'smime_self_encrypt', 'sort_re',
    485 \ 'ssl_force_tls', 'ssl_use_sslv2', 'ssl_use_sslv3', 'ssl_use_system_certs',
    486 \ 'ssl_use_tlsv1', 'ssl_use_tlsv1_1', 'ssl_use_tlsv1_2', 'ssl_use_tlsv1_3',
    487 \ 'ssl_verify_dates', 'ssl_verify_host', 'ssl_verify_partial_chains', 'status_on_top',
    488 \ 'strict_threads', 'suspend', 'text_flowed', 'thorough_search', 'thread_received', 'tilde',
    489 \ 'ts_enabled', 'tunnel_is_secure', 'uncollapse_jump', 'uncollapse_new', 'user_agent',
    490 \ 'use_8bit_mime', 'use_domain', 'use_envelope_from', 'use_from', 'use_ipv6',
    491 \ 'virtual_spool_file', 'wait_key', 'weed', 'wrap_search', 'write_bcc', 'x_comment_to'
    492 \ ], 0)
    493 
    494 " CHECKED 2024 Oct 12
    495 " Deprecated Bools
    496 " List of DT_SYNONYM or DT_DEPRECATED Bools in MuttVars in mutt_config.c
    497 call s:boolQuadGen('Bool', [
    498 \ 'askbcc', 'askcc', 'ask_follow_up', 'autoedit', 'confirmappend', 'confirmcreate',
    499 \ 'crypt_autoencrypt', 'crypt_autopgp', 'crypt_autosign', 'crypt_autosmime',
    500 \ 'crypt_confirmhook', 'crypt_replyencrypt', 'crypt_replysign', 'crypt_replysignencrypted',
    501 \ 'cursor_overlay', 'edit_hdrs', 'envelope_from', 'forw_decode', 'forw_decrypt',
    502 \ 'forw_quote', 'header_cache_compress', 'ignore_linear_white_space', 'imap_servernoise',
    503 \ 'implicit_autoview', 'include_onlyfirst', 'metoo', 'mime_subject', 'pgp_autoencrypt',
    504 \ 'pgp_autoinline', 'pgp_autosign', 'pgp_auto_traditional', 'pgp_create_traditional',
    505 \ 'pgp_replyencrypt', 'pgp_replyinline', 'pgp_replysign', 'pgp_replysignencrypted',
    506 \ 'pgp_self_encrypt_as', 'reverse_realname', 'smime_self_encrypt_as', 'ssl_usesystemcerts',
    507 \ 'use_8bitmime', 'virtual_spoolfile', 'xterm_set_titles'
    508 \ ], 1)
    509 
    510 " CHECKED 2024 Oct 12
    511 " List of DT_QUAD in MuttVars in mutt_config.c
    512 call s:boolQuadGen('Quad', [
    513 \ 'abort_noattach', 'abort_nosubject', 'abort_unmodified', 'bounce', 'catchup_newsgroup',
    514 \ 'copy', 'crypt_verify_sig', 'delete', 'fcc_attach', 'followup_to_poster',
    515 \ 'forward_attachments', 'forward_edit', 'honor_followup_to', 'include', 'mime_forward',
    516 \ 'mime_forward_rest', 'move', 'pgp_mime_auto', 'pop_delete', 'pop_reconnect', 'postpone',
    517 \ 'post_moderated', 'print', 'quit', 'recall', 'reply_to', 'ssl_starttls'
    518 \ ], 0)
    519 
    520 " CHECKED 2024 Oct 12
    521 " Deprecated Quads
    522 " List of DT_SYNONYM or DT_DEPRECATED Quads in MuttVars in mutt_config.c
    523 call s:boolQuadGen('Quad', [
    524 \ 'mime_fwd', 'pgp_encrypt_self', 'pgp_verify_sig', 'smime_encrypt_self'
    525 \ ], 1)
    526 
    527 " CHECKED 2024 Oct 12
    528 " List of DT_NUMBER or DT_LONG in MuttVars in mutt_config.c
    529 syntax keyword muttrcVarNum	skipwhite contained
    530 \ debug_level header_cache_compress_level history imap_fetch_chunk_size imap_keep_alive
    531 \ imap_pipeline_depth imap_poll_timeout mail_check mail_check_stats_interval menu_context
    532 \ net_inc nm_db_limit nm_open_timeout nm_query_window_current_position
    533 \ nm_query_window_duration nntp_context nntp_poll pager_context pager_index_lines
    534 \ pager_read_delay pager_skip_quoted_context pgp_timeout pop_check_interval read_inc
    535 \ reflow_wrap save_history score_threshold_delete score_threshold_flag score_threshold_read
    536 \ search_context sendmail_wait sidebar_component_depth sidebar_width sleep_time
    537 \ smime_timeout socket_timeout ssl_min_dh_prime_bits timeout time_inc
    538 \ toggle_quoted_show_levels wrap wrap_headers write_inc
    539 \ nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    540 " CHECKED 2024 Oct 12
    541 " Deprecated Numbers
    542 syntax keyword muttrcVarDeprecatedNum
    543 \ connect_timeout header_cache_pagesize imap_keepalive pop_checkinterval skip_quoted_offset
    544 
    545 " CHECKED 2024 Oct 12
    546 " List of DT_STRING in MuttVars in mutt_config.c
    547 " Special cases first, and all the rest at the end
    548 " Formats themselves must be updated in their respective groups
    549 " See s:escapesConditionals
    550 syntax match   muttrcVarString	contained skipwhite 'my_[a-zA-Z0-9_]\+' nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    551 syntax keyword muttrcVarString	contained skipwhite alias_format nextgroup=muttrcVarEqualsAliasFormat
    552 syntax keyword muttrcVarString	contained skipwhite attach_format nextgroup=muttrcVarEqualsAttachFormat
    553 syntax keyword muttrcVarString	contained skipwhite autocrypt_acct_format nextgroup=muttrcVarEqualsAutocryptFormat
    554 syntax keyword muttrcVarString	contained skipwhite compose_format nextgroup=muttrcVarEqualsComposeFormat
    555 syntax keyword muttrcVarString	contained skipwhite folder_format mailbox_folder_format nextgroup=muttrcVarEqualsFolderFormat
    556 syntax keyword muttrcVarString	contained skipwhite greeting nextgroup=muttrcVarEqualsGreetingFormat
    557 syntax keyword muttrcVarString	contained skipwhite history_format nextgroup=muttrcVarEqualsHistoryFormat
    558 syntax keyword muttrcVarString	contained skipwhite
    559 \ attribution_intro attribution_trailer forward_attribution_intro forward_attribution_trailer
    560 \ forward_format indent_string index_format message_format pager_format
    561 \ nextgroup=muttrcVarEqualsIndexFormat
    562 syntax keyword muttrcVarString	contained skipwhite pattern_format nextgroup=muttrcVarEqualsPatternFormat
    563 syntax keyword muttrcVarString	contained skipwhite
    564 \ pgp_clear_sign_command pgp_decode_command pgp_decrypt_command pgp_encrypt_only_command
    565 \ pgp_encrypt_sign_command pgp_export_command pgp_get_keys_command pgp_import_command
    566 \ pgp_list_pubring_command pgp_list_secring_command pgp_sign_command pgp_verify_command
    567 \ pgp_verify_key_command
    568 \ nextgroup=muttrcVarEqualsPgpCommandFormat
    569 syntax keyword muttrcVarString	contained skipwhite pgp_entry_format nextgroup=muttrcVarEqualsPgpEntryFormat
    570 syntax keyword muttrcVarString	contained skipwhite query_format nextgroup=muttrcVarEqualsQueryFormat
    571 syntax keyword muttrcVarString	contained skipwhite
    572 \ smime_decrypt_command smime_encrypt_command smime_get_cert_command
    573 \ smime_get_cert_email_command smime_get_signer_cert_command smime_import_cert_command
    574 \ smime_pk7out_command smime_sign_command smime_verify_command smime_verify_opaque_command
    575 \ nextgroup=muttrcVarEqualsSmimeCommandFormat
    576 syntax keyword muttrcVarString	contained skipwhite status_format ts_icon_format ts_status_format nextgroup=muttrcVarEqualsStatusFormat
    577 syntax keyword muttrcVarString	contained skipwhite date_format nextgroup=muttrcVarEqualsStrftimeFormat
    578 syntax keyword muttrcVarString	contained skipwhite group_index_format nextgroup=muttrcVarEqualsGroupIndexFormat
    579 syntax keyword muttrcVarString	contained skipwhite sidebar_format nextgroup=muttrcVarEqualsSidebarFormat
    580 syntax keyword muttrcVarString	contained skipwhite
    581 \ abort_key arrow_string assumed_charset attach_charset attach_sep attribution_locale
    582 \ charset config_charset content_type crypt_protected_headers_subject default_hook
    583 \ dsn_notify dsn_return empty_subject header_cache_backend header_cache_compress_method
    584 \ hidden_tags hostname imap_authenticators imap_delim_chars imap_headers imap_login
    585 \ imap_pass imap_user mailcap_path maildir_field_delimiter mark_macro_prefix mh_seq_flagged
    586 \ mh_seq_replied mh_seq_unseen newsgroups_charset newsrc news_server nm_config_profile
    587 \ nm_default_url nm_exclude_tags nm_flagged_tag nm_query_type nm_query_window_current_search
    588 \ nm_query_window_or_terms nm_query_window_timebase nm_record_tags nm_replied_tag
    589 \ nm_unread_tag nntp_authenticators nntp_pass nntp_user pgp_default_key pgp_sign_as pipe_sep
    590 \ pop_authenticators pop_host pop_pass pop_user postpone_encrypt_as preconnect
    591 \ preferred_languages real_name send_charset show_multipart_alternative sidebar_delim_chars
    592 \ sidebar_divider_char sidebar_indent_string simple_search smime_default_key
    593 \ smime_encrypt_with smime_sign_as smime_sign_digest_alg smtp_authenticators smtp_pass
    594 \ smtp_url smtp_user spam_separator ssl_ciphers
    595 \ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    596 
    597 " Deprecated strings
    598 syntax keyword muttrcVarDeprecatedString
    599 \ abort_noattach_regexp attach_keyword attribution escape forw_format hdr_format indent_str
    600 \ message_cachedir mixmaster mix_entry_format msg_format nm_default_uri
    601 \ pgp_clearsign_command pgp_getkeys_command pgp_self_encrypt_as post_indent_str
    602 \ post_indent_string print_cmd quote_regexp realname reply_regexp smime_self_encrypt_as
    603 \ spoolfile tmpdir vfolder_format visual xterm_icon xterm_title
    604 
    605 " CHECKED 2024 Oct 12
    606 " List of DT_ADDRESS
    607 syntax keyword muttrcVarString	contained skipwhite envelope_from_address from nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    608 " List of DT_ENUM
    609 syntax keyword muttrcVarString	contained skipwhite mbox_type use_threads nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    610 " List of DT_MBTABLE
    611 syntax keyword muttrcVarString	contained skipwhite crypt_chars flag_chars from_chars status_chars to_chars nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    612 
    613 " CHECKED 2024 Oct 12
    614 " List of DT_PATH or D_STRING_MAILBOX
    615 syntax keyword muttrcVarString	contained skipwhite
    616 \ alias_file attach_save_dir autocrypt_dir certificate_file debug_file entropy_file folder
    617 \ header_cache history_file mbox message_cache_dir news_cache_dir nm_config_file postponed
    618 \ record signature smime_ca_location smime_certificates smime_keys spool_file
    619 \ ssl_ca_certificates_file ssl_client_cert tmp_dir trash
    620 \ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    621 " List of DT_COMMAND (excluding pgp_*_command and smime_*_command)
    622 syntax keyword muttrcVarString	contained skipwhite
    623 \ account_command display_filter editor external_search_command imap_oauth_refresh_command
    624 \ inews ispell mime_type_query_command new_mail_command pager pop_oauth_refresh_command
    625 \ print_command query_command sendmail shell smtp_oauth_refresh_command tunnel
    626 \ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    627 
    628 " CHECKED 2024 Oct 12
    629 " List of DT_REGEX
    630 syntax keyword muttrcVarString	contained skipwhite
    631 \ abort_noattach_regex gecos_mask mask pgp_decryption_okay pgp_good_sign quote_regex
    632 \ reply_regex smileys
    633 \ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    634 " List of DT_SORT
    635 syntax keyword muttrcVarString	contained skipwhite
    636 \ pgp_sort_keys sidebar_sort_method sort sort_alias sort_aux sort_browser
    637 \ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    638 
    639 " CHECKED 2024 Oct 12
    640 " List of commands in mutt_commands in commands.c
    641 " Remember to remove hooks, they have already been dealt with
    642 syntax keyword muttrcCommand	skipwhite alias nextgroup=muttrcAliasGroupDef,muttrcAliasKey,muttrcAliasNL
    643 syntax keyword muttrcCommand	skipwhite bind nextgroup=muttrcBindMenuList,muttrcBindMenuListNL
    644 syntax keyword muttrcCommand	skipwhite exec nextgroup=muttrcFunction
    645 syntax keyword muttrcCommand	skipwhite macro nextgroup=muttrcMacroMenuList,muttrcMacroMenuListNL
    646 syntax keyword muttrcCommand	skipwhite nospam nextgroup=muttrcNoSpamPattern
    647 syntax keyword muttrcCommand	skipwhite set unset reset toggle nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
    648 syntax keyword muttrcCommand	skipwhite spam nextgroup=muttrcSpamPattern
    649 syntax keyword muttrcCommand	skipwhite unalias nextgroup=muttrcUnAliasKey,muttrcUnAliasNL
    650 syntax keyword muttrcCommand	skipwhite unhook nextgroup=muttrcHooks
    651 syntax keyword muttrcCommand	skipwhite
    652 \ alternative_order attachments auto_view cd echo finish hdr_order ifdef ifndef ignore lua
    653 \ lua-source mailboxes mailto_allow mime_lookup my_hdr named-mailboxes push score setenv
    654 \ sidebar_pin sidebar_unpin source subjectrx subscribe-to tag-formats tag-transforms
    655 \ unalternative_order unattachments unauto_view unbind uncolor unhdr_order unignore unmacro
    656 \ unmailboxes unmailto_allow unmime_lookup unmono unmy_hdr unscore unsetenv unsubjectrx
    657 \ unsubscribe-from unvirtual-mailboxes version virtual-mailboxes
    658 
    659 " CHECKED 2024 Oct 12
    660 " Deprecated commands
    661 syntax keyword muttrcDeprecatedCommand skipwhite
    662 \ sidebar_whitelist unsidebar_whitelist
    663 
    664 function! s:genFunctions(functions)
    665 for f in a:functions
    666 	exec 'syntax match muttrcFunction contained "\<' . l:f . '\>"'
    667 endfor
    668 endfunction
    669 
    670 " CHECKED 2024 Oct 12
    671 " List of functions in functions.c
    672 " Note: 'noop' is included but is elsewhere in the source
    673 call s:genFunctions(['noop',
    674 \ 'alias-dialog', 'attach-file', 'attach-key', 'attach-message', 'attach-news-message',
    675 \ 'autocrypt-acct-menu', 'autocrypt-menu', 'backspace', 'backward-char', 'backward-word',
    676 \ 'bol', 'bottom', 'bottom-page', 'bounce-message', 'break-thread', 'buffy-cycle',
    677 \ 'buffy-list', 'capitalize-word', 'catchup', 'change-dir', 'change-folder',
    678 \ 'change-folder-readonly', 'change-newsgroup', 'change-newsgroup-readonly',
    679 \ 'change-vfolder', 'check-new', 'check-stats', 'check-traditional-pgp', 'clear-flag',
    680 \ 'collapse-all', 'collapse-parts', 'collapse-thread', 'complete', 'complete-query',
    681 \ 'compose-to-sender', 'copy-file', 'copy-message', 'create-account', 'create-alias',
    682 \ 'create-mailbox', 'current-bottom', 'current-middle', 'current-top', 'decode-copy',
    683 \ 'decode-save', 'decrypt-copy', 'decrypt-save', 'delete-account', 'delete-char',
    684 \ 'delete-entry', 'delete-mailbox', 'delete-message', 'delete-pattern', 'delete-subthread',
    685 \ 'delete-thread', 'descend-directory', 'detach-file', 'display-address',
    686 \ 'display-filename', 'display-message', 'display-toggle-weed', 'downcase-word', 'edit',
    687 \ 'edit-bcc', 'edit-cc', 'edit-content-id', 'edit-description', 'edit-encoding', 'edit-fcc',
    688 \ 'edit-file', 'edit-followup-to', 'edit-from', 'edit-headers', 'edit-label',
    689 \ 'edit-language', 'edit-message', 'edit-mime', 'edit-newsgroups',
    690 \ 'edit-or-view-raw-message', 'edit-raw-message', 'edit-reply-to', 'edit-subject',
    691 \ 'edit-to', 'edit-type', 'edit-x-comment-to', 'end-cond', 'enter-command', 'enter-mask',
    692 \ 'entire-thread', 'eol', 'error-history', 'exit', 'extract-keys', 'fetch-mail',
    693 \ 'filter-entry', 'first-entry', 'flag-message', 'followup-message', 'forget-passphrase',
    694 \ 'forward-char', 'forward-message', 'forward-to-group', 'forward-word', 'get-attachment',
    695 \ 'get-children', 'get-message', 'get-parent', 'goto-folder', 'goto-parent',
    696 \ 'group-alternatives', 'group-chat-reply', 'group-multilingual', 'group-related',
    697 \ 'group-reply', 'half-down', 'half-up', 'help', 'history-down', 'history-search',
    698 \ 'history-up', 'imap-fetch-mail', 'imap-logout-all', 'ispell', 'jump', 'kill-eol',
    699 \ 'kill-eow', 'kill-line', 'kill-whole-line', 'kill-word', 'last-entry', 'limit',
    700 \ 'limit-current-thread', 'link-threads', 'list-reply', 'list-subscribe',
    701 \ 'list-unsubscribe', 'mail', 'mail-key', 'mailbox-cycle', 'mailbox-list', 'mark-as-new',
    702 \ 'mark-message', 'middle-page', 'modify-labels', 'modify-labels-then-hide', 'modify-tags',
    703 \ 'modify-tags-then-hide', 'move-down', 'move-up', 'new-mime', 'next-entry', 'next-line',
    704 \ 'next-new', 'next-new-then-unread', 'next-page', 'next-subthread', 'next-thread',
    705 \ 'next-undeleted', 'next-unread', 'next-unread-mailbox', 'parent-message', 'pgp-menu',
    706 \ 'pipe-entry', 'pipe-message', 'post-message', 'postpone-message', 'previous-entry',
    707 \ 'previous-line', 'previous-new', 'previous-new-then-unread', 'previous-page',
    708 \ 'previous-subthread', 'previous-thread', 'previous-undeleted', 'previous-unread',
    709 \ 'print-entry', 'print-message', 'purge-message', 'purge-thread', 'quasi-delete', 'query',
    710 \ 'query-append', 'quit', 'quote-char', 'read-subthread', 'read-thread', 'recall-message',
    711 \ 'reconstruct-thread', 'redraw-screen', 'refresh', 'reload-active', 'rename-attachment',
    712 \ 'rename-file', 'rename-mailbox', 'reply', 'resend-message', 'root-message', 'save-entry',
    713 \ 'save-message', 'search', 'search-next', 'search-opposite', 'search-reverse',
    714 \ 'search-toggle', 'select-entry', 'select-new', 'send-message', 'set-flag', 'shell-escape',
    715 \ 'show-limit', 'show-log-messages', 'show-version', 'sidebar-first', 'sidebar-last',
    716 \ 'sidebar-next', 'sidebar-next-new', 'sidebar-open', 'sidebar-page-down',
    717 \ 'sidebar-page-up', 'sidebar-prev', 'sidebar-prev-new', 'sidebar-toggle-virtual',
    718 \ 'sidebar-toggle-visible', 'skip-headers', 'skip-quoted', 'smime-menu', 'sort',
    719 \ 'sort-alias', 'sort-alias-reverse', 'sort-mailbox', 'sort-reverse', 'subscribe',
    720 \ 'subscribe-pattern', 'sync-mailbox', 'tag-entry', 'tag-message', 'tag-pattern',
    721 \ 'tag-prefix', 'tag-prefix-cond', 'tag-subthread', 'tag-thread', 'toggle-active',
    722 \ 'toggle-disposition', 'toggle-mailboxes', 'toggle-new', 'toggle-prefer-encrypt',
    723 \ 'toggle-quoted', 'toggle-read', 'toggle-recode', 'toggle-subscribed', 'toggle-unlink',
    724 \ 'toggle-write', 'top', 'top-page', 'transpose-chars', 'uncatchup', 'undelete-entry',
    725 \ 'undelete-message', 'undelete-pattern', 'undelete-subthread', 'undelete-thread',
    726 \ 'ungroup-attachment', 'unsubscribe', 'unsubscribe-pattern', 'untag-pattern',
    727 \ 'upcase-word', 'update-encoding', 'verify-key', 'vfolder-from-query',
    728 \ 'vfolder-from-query-readonly', 'vfolder-window-backward', 'vfolder-window-forward',
    729 \ 'vfolder-window-reset', 'view-attach', 'view-attachments', 'view-file', 'view-mailcap',
    730 \ 'view-name', 'view-pager', 'view-raw-message', 'view-text', 'what-key', 'write-fcc'
    731 \ ])
    732 
    733 " Define the default highlighting.
    734 " Only when an item doesn't have highlighting yet
    735 
    736 highlight def link muttrcSetBoolAssignment		Boolean
    737 highlight def link muttrcSetQuadAssignment		Boolean
    738 
    739 highlight def link muttrcComment			Comment
    740 
    741 highlight def link muttrcAlternatesLine			Error
    742 highlight def link muttrcBadAction			Error
    743 highlight def link muttrcBindFunction			Error
    744 highlight def link muttrcBindMenuList			Error
    745 highlight def link muttrcColorBG			Error
    746 highlight def link muttrcColorContext			Error
    747 highlight def link muttrcColorFG			Error
    748 highlight def link muttrcColorLine			Error
    749 highlight def link muttrcDeprecatedCommand		Error
    750 highlight def link muttrcFormatErrors			Error
    751 highlight def link muttrcGroupLine			Error
    752 highlight def link muttrcPattern			Error
    753 highlight def link muttrcUnColorLine			Error
    754 highlight def link muttrcVarDeprecatedBool		Error
    755 highlight def link muttrcVarDeprecatedNum		Error
    756 highlight def link muttrcVarDeprecatedQuad		Error
    757 highlight def link muttrcVarDeprecatedString		Error
    758 
    759 highlight def link muttrcAliasEncEmail			Identifier
    760 highlight def link muttrcAliasKey			Identifier
    761 highlight def link muttrcColorCompose			Identifier
    762 highlight def link muttrcColorComposeField		Identifier
    763 highlight def link muttrcColorField			Identifier
    764 highlight def link muttrcMenu				Identifier
    765 highlight def link muttrcSimplePat			Identifier
    766 highlight def link muttrcUnAliasKey			Identifier
    767 highlight def link muttrcUnColorIndex			Identifier
    768 highlight def link muttrcVarBool			Identifier
    769 highlight def link muttrcVarNum				Identifier
    770 highlight def link muttrcVarQuad			Identifier
    771 highlight def link muttrcVarString			Identifier
    772 
    773 highlight def link muttrcCommand			Keyword
    774 
    775 highlight def link muttrcAction				Macro
    776 highlight def link muttrcAliasGroupName			Macro
    777 highlight def link muttrcFunction			Macro
    778 highlight def link muttrcGroupDef			Macro
    779 highlight def link muttrcSimplePatString		Macro
    780 
    781 highlight def link muttrcMonoAttrib			muttrcColor
    782 
    783 highlight def link muttrcAlternateKeyword		muttrcCommand
    784 highlight def link muttrcAttachmentsLine		muttrcCommand
    785 highlight def link muttrcColorKeyword			muttrcCommand
    786 highlight def link muttrcGroupKeyword			muttrcCommand
    787 highlight def link muttrcListsKeyword			muttrcCommand
    788 highlight def link muttrcMono				muttrcCommand
    789 highlight def link muttrcPatHooks			muttrcCommand
    790 highlight def link muttrcRXHooks			muttrcCommand
    791 highlight def link muttrcSubscribeKeyword		muttrcCommand
    792 highlight def link muttrcUnColorKeyword			muttrcCommand
    793 
    794 highlight def link muttrcAliasFormatEscapes		muttrcEscape
    795 highlight def link muttrcAttachFormatEscapes		muttrcEscape
    796 highlight def link muttrcAutocryptFormatEscapes		muttrcEscape
    797 highlight def link muttrcComposeFormatEscapes		muttrcEscape
    798 highlight def link muttrcFolderFormatEscapes		muttrcEscape
    799 highlight def link muttrcGreetingFormatEscapes		muttrcEscape
    800 highlight def link muttrcGroupIndexFormatEscapes	muttrcEscape
    801 highlight def link muttrcHistoryFormatEscapes		muttrcEscape
    802 highlight def link muttrcIndexFormatEscapes		muttrcEscape
    803 highlight def link muttrcPatternFormatEscapes		muttrcEscape
    804 highlight def link muttrcPgpCommandFormatEscapes	muttrcEscape
    805 highlight def link muttrcPgpEntryFormatEscapes		muttrcEscape
    806 highlight def link muttrcPgpTimeEscapes			muttrcEscape
    807 highlight def link muttrcQueryFormatEscapes		muttrcEscape
    808 highlight def link muttrcShellString			muttrcEscape
    809 highlight def link muttrcSidebarFormatEscapes		muttrcEscape
    810 highlight def link muttrcSmimeCommandFormatEscapes	muttrcEscape
    811 highlight def link muttrcStatusFormatEscapes		muttrcEscape
    812 highlight def link muttrcTimeEscapes			muttrcEscape
    813 
    814 highlight def link muttrcAliasFormatConditionals	 muttrcFormatConditionals2
    815 highlight def link muttrcAttachFormatConditionals	 muttrcFormatConditionals2
    816 highlight def link muttrcAutocryptFormatConditionals	 muttrcFormatConditionals2
    817 highlight def link muttrcComposeFormatConditionals	 muttrcFormatConditionals2
    818 highlight def link muttrcFolderFormatConditionals	 muttrcFormatConditionals2
    819 highlight def link muttrcGreetingFormatConditionals	 muttrcFormatConditionals2
    820 highlight def link muttrcGroupIndexFormatConditionals	 muttrcFormatConditionals2
    821 highlight def link muttrcHistoryFormatConditionals	 muttrcFormatConditionals2
    822 highlight def link muttrcIndexFormatConditionals	 muttrcFormatConditionals2
    823 highlight def link muttrcPatternFormatConditionals	 muttrcFormatConditionals2
    824 highlight def link muttrcPgpCommandFormatConditionals	 muttrcFormatConditionals2
    825 highlight def link muttrcPgpEntryFormatConditionals	 muttrcFormatConditionals2
    826 highlight def link muttrcQueryFormatConditionals	 muttrcFormatConditionals2
    827 highlight def link muttrcSidebarFormatConditionals	 muttrcFormatConditionals2
    828 highlight def link muttrcSmimeCommandFormatConditionals	 muttrcFormatConditionals2
    829 highlight def link muttrcStatusFormatConditionals	 muttrcFormatConditionals2
    830 
    831 highlight def link muttrcAddrDef			muttrcGroupFlag
    832 highlight def link muttrcRXDef				muttrcGroupFlag
    833 
    834 highlight def link muttrcAliasFormatString		muttrcString
    835 highlight def link muttrcAttachFormatString		muttrcString
    836 highlight def link muttrcAutocryptFormatString		muttrcString
    837 highlight def link muttrcComposeFormatString		muttrcString
    838 highlight def link muttrcFolderFormatString		muttrcString
    839 highlight def link muttrcGreetingFormatString		muttrcString
    840 highlight def link muttrcGroupIndexFormatString		muttrcString
    841 highlight def link muttrcHistoryFormatString		muttrcString
    842 highlight def link muttrcIndexFormatString		muttrcString
    843 highlight def link muttrcPatternFormatString		muttrcString
    844 highlight def link muttrcPgpCommandFormatString		muttrcString
    845 highlight def link muttrcPgpEntryFormatString		muttrcString
    846 highlight def link muttrcQueryFormatString		muttrcString
    847 highlight def link muttrcSidebarFormatString		muttrcString
    848 highlight def link muttrcSmimeCommandFormatString	muttrcString
    849 highlight def link muttrcStatusFormatString		muttrcString
    850 highlight def link muttrcStrftimeFormatString		muttrcString
    851 
    852 highlight def link muttrcSetNumAssignment		Number
    853 
    854 highlight def link muttrcEmail				Special
    855 highlight def link muttrcSimplePatMetas			Special
    856 highlight def link muttrcSpecial			Special
    857 highlight def link muttrcVariableInner			Special
    858 
    859 highlight def link muttrcAliasEncEmailNL		SpecialChar
    860 highlight def link muttrcAliasENNL			SpecialChar
    861 highlight def link muttrcAliasGroupDefNL		SpecialChar
    862 highlight def link muttrcAliasNameNL			SpecialChar
    863 highlight def link muttrcAliasNL			SpecialChar
    864 highlight def link muttrcBindFunctionNL			SpecialChar
    865 highlight def link muttrcBindKeyNL			SpecialChar
    866 highlight def link muttrcBindMenuListNL			SpecialChar
    867 highlight def link muttrcColorBGNL			SpecialChar
    868 highlight def link muttrcColorFGNL			SpecialChar
    869 highlight def link muttrcColorMatchCountNL		SpecialChar
    870 highlight def link muttrcColorNL			SpecialChar
    871 highlight def link muttrcColorRXNL			SpecialChar
    872 highlight def link muttrcEscape				SpecialChar
    873 highlight def link muttrcKeyName			SpecialChar
    874 highlight def link muttrcKeySpecial			SpecialChar
    875 highlight def link muttrcMacroBodyNL			SpecialChar
    876 highlight def link muttrcMacroDescrNL			SpecialChar
    877 highlight def link muttrcMacroKeyNL			SpecialChar
    878 highlight def link muttrcMacroMenuListNL		SpecialChar
    879 highlight def link muttrcRXChars			SpecialChar
    880 highlight def link muttrcStringNL			SpecialChar
    881 highlight def link muttrcUnAliasNL			SpecialChar
    882 highlight def link muttrcUnColorAPNL			SpecialChar
    883 highlight def link muttrcUnColorIndexNL			SpecialChar
    884 highlight def link muttrcUnColorPatNL			SpecialChar
    885 
    886 highlight def link muttrcAttachmentsMimeType		String
    887 highlight def link muttrcEscapedVariable		String
    888 highlight def link muttrcMacroDescr			String
    889 highlight def link muttrcRXPat				String
    890 highlight def link muttrcRXString			String
    891 highlight def link muttrcRXString2			String
    892 highlight def link muttrcSetStrAssignment		String
    893 highlight def link muttrcString				String
    894 
    895 highlight def link muttrcAttachmentsFlag		Type
    896 highlight def link muttrcColor				Type
    897 highlight def link muttrcFormatConditionals2		Type
    898 highlight def link muttrcGroupFlag			Type
    899 highlight def link muttrcHeader				Type
    900 highlight def link muttrcHooks				Type
    901 highlight def link muttrcKey				Type
    902 highlight def link muttrcPatHookNot			Type
    903 highlight def link muttrcRXHookNot			Type
    904 highlight def link muttrcStrftimeEscapes		Type
    905 
    906 let b:current_syntax = "neomuttrc"
    907 
    908 let &cpo = s:cpo_save
    909 unlet s:cpo_save
    910 
    911 " vim: ts=8 noet tw=100 sw=8 sts=0 ft=vim isk+=-