blob: 815e160bbbee88be928a4a78e05047813e4a88f7 [file] [log] [blame]
Bram Moolenaar01164a62017-11-02 22:58:42 +01001" Vim syntax file
2" Language: NeoMutt setup files
Bram Moolenaar403f3eb2019-11-20 22:31:13 +01003" Maintainer: Richard Russon <rich@flatcap.org>
4" Previous Maintainer: Guillaume Brogi <gui-gui@netcourrier.com>
Richard Russona2aa9212024-10-13 19:40:43 +02005" Last Change: 2024 Oct 12
Bram Moolenaar01164a62017-11-02 22:58:42 +01006" Original version based on syntax/muttrc.vim
7
Richard Russona2aa9212024-10-13 19:40:43 +02008" This file covers NeoMutt 2024-10-02
Bram Moolenaar01164a62017-11-02 22:58:42 +01009
10" quit when a syntax file was already loaded
11if exists("b:current_syntax")
12 finish
13endif
14
15let s:cpo_save = &cpo
16set cpo&vim
17
18" Set the keyword characters
19setlocal isk=@,48-57,_,-
20
21" handling optional variables
Bram Moolenaare46a4402020-06-30 20:38:27 +020022syntax match muttrcComment "^# .*$" contains=@Spell
23syntax match muttrcComment "^#[^ ].*$"
24syntax match muttrcComment "^#$"
Richard Russona2aa9212024-10-13 19:40:43 +020025syntax match muttrcComment "[^\\]#.*$"lc=1 contains=@Spell
Bram Moolenaar01164a62017-11-02 22:58:42 +010026
27" Escape sequences (back-tick and pipe goes here too)
Bram Moolenaare46a4402020-06-30 20:38:27 +020028syntax match muttrcEscape +\\[#tnr"'Cc ]+
29syntax match muttrcEscape +[`|]+
30syntax match muttrcEscape +\\$+
Bram Moolenaar01164a62017-11-02 22:58:42 +010031
32" The variables takes the following arguments
Bram Moolenaare46a4402020-06-30 20:38:27 +020033syntax region muttrcString contained keepend start=+"+ms=e skip=+\\"+ end=+"+ contains=muttrcEscape,muttrcCommand,muttrcAction,muttrcShellString
34syntax region muttrcString contained keepend start=+'+ms=e skip=+\\'+ end=+'+ contains=muttrcEscape,muttrcCommand,muttrcAction
Bram Moolenaar01164a62017-11-02 22:58:42 +010035syntax match muttrcStringNL contained skipwhite skipnl "\s*\\$" nextgroup=muttrcString,muttrcStringNL
36
Richard Russona2aa9212024-10-13 19:40:43 +020037syntax region muttrcShellString matchgroup=muttrcEscape keepend start=+`+ skip=+\\`+ end=+`+ contains=muttrcVarString,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcCommand
Bram Moolenaar01164a62017-11-02 22:58:42 +010038
39syntax match muttrcRXChars contained /[^\\][][.*?+]\+/hs=s+1
40syntax match muttrcRXChars contained /[][|()][.*?+]*/
41syntax match muttrcRXChars contained /['"]^/ms=s+1
42syntax match muttrcRXChars contained /$['"]/me=e-1
43syntax match muttrcRXChars contained /\\/
44" Why does muttrcRXString2 work with one \ when muttrcRXString requires two?
45syntax region muttrcRXString contained skipwhite start=+'+ skip=+\\'+ end=+'+ contains=muttrcRXChars
46syntax region muttrcRXString contained skipwhite start=+"+ skip=+\\"+ end=+"+ contains=muttrcRXChars
Bram Moolenaare46a4402020-06-30 20:38:27 +020047syntax region muttrcRXString contained skipwhite start=+[^ "'^]+ skip=+\\\s+ end=+\s+re=e-1 contains=muttrcRXChars
Bram Moolenaar01164a62017-11-02 22:58:42 +010048" For some reason, skip refuses to match backslashes here...
49syntax region muttrcRXString contained matchgroup=muttrcRXChars skipwhite start=+\^+ end=+[^\\]\s+re=e-1 contains=muttrcRXChars
50syntax region muttrcRXString contained matchgroup=muttrcRXChars skipwhite start=+\^+ end=+$\s+ contains=muttrcRXChars
51syntax region muttrcRXString2 contained skipwhite start=+'+ skip=+\'+ end=+'+ contains=muttrcRXChars
52syntax region muttrcRXString2 contained skipwhite start=+"+ skip=+\"+ end=+"+ contains=muttrcRXChars
53
Bram Moolenaare46a4402020-06-30 20:38:27 +020054" these must be kept synchronized with muttrcRXString, but are intended for muttrcRXHooks
Bram Moolenaar01164a62017-11-02 22:58:42 +010055syntax region muttrcRXHookString contained keepend skipwhite start=+'+ skip=+\\'+ end=+'+ contains=muttrcRXString nextgroup=muttrcString,muttrcStringNL
56syntax region muttrcRXHookString contained keepend skipwhite start=+"+ skip=+\\"+ end=+"+ contains=muttrcRXString nextgroup=muttrcString,muttrcStringNL
Bram Moolenaare46a4402020-06-30 20:38:27 +020057syntax region muttrcRXHookString contained keepend skipwhite start=+[^ "'^]+ skip=+\\\s+ end=+\s+re=e-1 contains=muttrcRXString nextgroup=muttrcString,muttrcStringNL
Bram Moolenaar01164a62017-11-02 22:58:42 +010058syntax region muttrcRXHookString contained keepend skipwhite start=+\^+ end=+[^\\]\s+re=e-1 contains=muttrcRXString nextgroup=muttrcString,muttrcStringNL
59syntax region muttrcRXHookString contained keepend matchgroup=muttrcRXChars skipwhite start=+\^+ end=+$\s+ contains=muttrcRXString nextgroup=muttrcString,muttrcStringNL
Bram Moolenaare46a4402020-06-30 20:38:27 +020060syntax match muttrcRXHookStringNL contained skipwhite skipnl "\s*\\$" nextgroup=muttrcRXHookString,muttrcRXHookStringNL
Bram Moolenaar01164a62017-11-02 22:58:42 +010061
62" these are exclusively for args lists (e.g. -rx pat pat pat ...)
Bram Moolenaare46a4402020-06-30 20:38:27 +020063syntax region muttrcRXPat contained keepend skipwhite start=+'+ skip=+\\'+ end=+'\s*+ contains=muttrcRXString nextgroup=muttrcRXPat
64syntax region muttrcRXPat contained keepend skipwhite start=+"+ skip=+\\"+ end=+"\s*+ contains=muttrcRXString nextgroup=muttrcRXPat
65syntax match muttrcRXPat contained /[^-'"#!]\S\+/ skipwhite contains=muttrcRXChars nextgroup=muttrcRXPat
66syntax match muttrcRXDef contained "-rx\s\+" skipwhite nextgroup=muttrcRXPat
Bram Moolenaar01164a62017-11-02 22:58:42 +010067
Bram Moolenaare46a4402020-06-30 20:38:27 +020068syntax match muttrcSpecial +\(['"]\)!\1+
Bram Moolenaar01164a62017-11-02 22:58:42 +010069
Richard Russona2aa9212024-10-13 19:40:43 +020070syntax match muttrcSetStrAssignment contained skipwhite /=\s*\%(\\\?\$\)\?[0-9A-Za-z_-]\+/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString contains=muttrcVariable,muttrcEscapedVariable
71syntax region muttrcSetStrAssignment contained skipwhite keepend start=+=\s*"+hs=s+1 end=+"+ skip=+\\"+ nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString contains=muttrcString
72syntax region muttrcSetStrAssignment contained skipwhite keepend start=+=\s*'+hs=s+1 end=+'+ skip=+\\'+ nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString contains=muttrcString
73syntax match muttrcSetBoolAssignment contained skipwhite /=\s*\\\?\$\w\+/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString contains=muttrcVariable,muttrcEscapedVariable
74syntax match muttrcSetBoolAssignment contained skipwhite /=\s*\%(yes\|no\)/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
75syntax match muttrcSetBoolAssignment contained skipwhite /=\s*"\%(yes\|no\)"/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
76syntax match muttrcSetBoolAssignment contained skipwhite /=\s*'\%(yes\|no\)'/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
77syntax match muttrcSetQuadAssignment contained skipwhite /=\s*\\\?\$\w\+/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString contains=muttrcVariable,muttrcEscapedVariable
78syntax match muttrcSetQuadAssignment contained skipwhite /=\s*\%(ask-\)\?\%(yes\|no\)/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
79syntax match muttrcSetQuadAssignment contained skipwhite /=\s*"\%(ask-\)\?\%(yes\|no\)"/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
80syntax match muttrcSetQuadAssignment contained skipwhite /=\s*'\%(ask-\)\?\%(yes\|no\)'/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
81syntax match muttrcSetNumAssignment contained skipwhite /=\s*\\\?\$\w\+/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString contains=muttrcVariable,muttrcEscapedVariable
82syntax match muttrcSetNumAssignment contained skipwhite /=\s*\d\+/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
83syntax match muttrcSetNumAssignment contained skipwhite /=\s*"\d\+"/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
84syntax match muttrcSetNumAssignment contained skipwhite /=\s*'\d\+'/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
Bram Moolenaar01164a62017-11-02 22:58:42 +010085
86" Now catch some email addresses and headers (purified version from mail.vim)
Bram Moolenaare46a4402020-06-30 20:38:27 +020087syntax match muttrcEmail "[a-zA-Z0-9._-]\+@[a-zA-Z0-9./-]\+"
88syntax match muttrcHeader "\<\c\%(From\|To\|C[Cc]\|B[Cc][Cc]\|Reply-To\|Subject\|Return-Path\|Received\|Date\|Replied\|Attach\)\>:\="
Bram Moolenaar01164a62017-11-02 22:58:42 +010089
90syntax match muttrcKeySpecial contained +\%(\\[Cc'"]\|\^\|\\[01]\d\{2}\)+
Bram Moolenaare46a4402020-06-30 20:38:27 +020091syntax match muttrcKey contained "\S\+" contains=muttrcKeySpecial,muttrcKeyName
92syntax region muttrcKey contained start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=muttrcKeySpecial,muttrcKeyName
93syntax region muttrcKey contained start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=muttrcKeySpecial,muttrcKeyName
Bram Moolenaar01164a62017-11-02 22:58:42 +010094syntax match muttrcKeyName contained "\\[trne]"
95syntax match muttrcKeyName contained "\c<\%(BackSpace\|BackTab\|Delete\|Down\|End\|Enter\|Esc\|Home\|Insert\|Left\|Next\|PageDown\|PageUp\|Return\|Right\|Space\|Tab\|Up\)>"
96syntax match muttrcKeyName contained "\c<F\d\+>"
97
98syntax match muttrcFormatErrors contained /%./
99
100syntax match muttrcStrftimeEscapes contained /%[AaBbCcDdeFGgHhIjklMmnpRrSsTtUuVvWwXxYyZz+%]/
101syntax match muttrcStrftimeEscapes contained /%E[cCxXyY]/
102syntax match muttrcStrftimeEscapes contained /%O[BdeHImMSuUVwWy]/
103
Richard Russona2aa9212024-10-13 19:40:43 +0200104" 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
Bram Moolenaar01164a62017-11-02 22:58:42 +0100107syntax match muttrcFormatConditionals2 contained /[^?]*?/
Bram Moolenaare46a4402020-06-30 20:38:27 +0200108function! s:escapesConditionals(baseName, sequence, padding, conditional)
Bram Moolenaar01164a62017-11-02 22:58:42 +0100109 exec 'syntax match muttrc' . a:baseName . 'Escapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?\%(' . a:sequence . '\|%\)/'
Bram Moolenaare46a4402020-06-30 20:38:27 +0200110 if a:padding
Bram Moolenaar01164a62017-11-02 22:58:42 +0100111 exec 'syntax match muttrc' . a:baseName . 'Escapes contained /%[>|*]./'
112 endif
Bram Moolenaare46a4402020-06-30 20:38:27 +0200113 if a:conditional
Bram Moolenaar01164a62017-11-02 22:58:42 +0100114 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
118endfunction
119
Richard Russona2aa9212024-10-13 19:40:43 +0200120" CHECKED 2024 Oct 12
121" Ref: AliasFormatDef in alias/config.c
122call s:escapesConditionals('AliasFormat', '[acfnrtY]', 1, 0)
123" Ref: AttachFormatDef in mutt_config.c
Bram Moolenaar01164a62017-11-02 22:58:42 +0100124call s:escapesConditionals('AttachFormat', '[CcDdeFfIMmnQsTtuX]', 1, 1)
Richard Russona2aa9212024-10-13 19:40:43 +0200125" Ref: AutocryptFormatDef in autocrypt/config.c
126call s:escapesConditionals('AutocryptFormat', '[aknps]', 1, 0)
127" Ref: ComposeFormatDef in compose/config.c
Bram Moolenaare46a4402020-06-30 20:38:27 +0200128call s:escapesConditionals('ComposeFormat', '[ahlv]', 1, 1)
Richard Russona2aa9212024-10-13 19:40:43 +0200129" Ref: FolderFormatDef in browser/config.c
130call s:escapesConditionals('FolderFormat', '[aCDdFfgilmNnpstu[]', 1, 1)
131" Ref: GreetingFormatDef in send/config.c
132call s:escapesConditionals('GreetingFormat', '[nuv]', 0, 0)
133" Ref: GroupIndexFormatDef in browser/config.c
134call s:escapesConditionals('GroupIndexFormat', '[aCdfMNnps]', 1, 0)
135" Ref: HistoryFormatDef in history/config.c
136call s:escapesConditionals('HistoryFormat', '[Cs]', 1, 0)
137" Ref: IndexFormatDef in mutt_config.c
Bram Moolenaare46a4402020-06-30 20:38:27 +0200138call s:escapesConditionals('IndexFormat', '[AaBbCDdEefgHIiJKLlMmNnOPqRrSsTtuvWXxYyZ(<[{]\|@\i\+@\|G[a-zA-Z]\+\|Fp\=\|z[cst]\|cr\=', 1, 1)
Richard Russona2aa9212024-10-13 19:40:43 +0200139" Ref: PatternFormatDef in pattern/config.c
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +0100140call s:escapesConditionals('PatternFormat', '[den]', 1, 0)
Richard Russona2aa9212024-10-13 19:40:43 +0200141" Ref: PgpCommandFormatDef in ncrypt/config.c
142call s:escapesConditionals('PgpCommandFormat', '[afprs]', 0, 1)
143" Ref: PgpEntryFormatDef in ncrypt/config.c
144call s:escapesConditionals('PgpEntryFormat', '[AaCcFfIiKkLlnptu[]', 1, 1)
145" Ref: QueryFormatDef in alias/config.c
146call s:escapesConditionals('QueryFormat', '[acentY]', 1, 1)
147" Ref: SidebarFormatDef in sidebar/config.c
148call s:escapesConditionals('SidebarFormat', '[!aBDdFLNnoprStZ]', 1, 1)
149" Ref: SmimeCommandFormatDef in ncrypt/config.c
150call s:escapesConditionals('SmimeCommandFormat', '[aCcdfiks]', 0, 1)
151" Ref: StatusFormatDef in mutt_config.c
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +0100152call s:escapesConditionals('StatusFormat', '[bDdFfhLlMmnoPpRrSsTtuVv]', 1, 1)
Bram Moolenaar7dda86f2018-04-20 22:36:41 +0200153
Richard Russona2aa9212024-10-13 19:40:43 +0200154syntax region muttrcAliasFormatString contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcAliasFormatEscapes,muttrcAliasFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
155syntax region muttrcAliasFormatString contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcAliasFormatEscapes,muttrcAliasFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
156syntax region muttrcAttachFormatString contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcAttachFormatEscapes,muttrcAttachFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
157syntax region muttrcAttachFormatString contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcAttachFormatEscapes,muttrcAttachFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
158syntax region muttrcAutocryptFormatString contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcAutocryptFormatEscapes,muttrcAutocryptFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
159syntax region muttrcAutocryptFormatString contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcAutocryptFormatEscapes,muttrcAutocryptFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
160syntax region muttrcComposeFormatString contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcComposeFormatEscapes,muttrcComposeFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
161syntax region muttrcComposeFormatString contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcComposeFormatEscapes,muttrcComposeFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
162syntax region muttrcFolderFormatString contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcFolderFormatEscapes,muttrcFolderFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
163syntax region muttrcFolderFormatString contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcFolderFormatEscapes,muttrcFolderFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
164syntax region muttrcGreetingFormatString contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcGreetingFormatEscapes,muttrcGreetingFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
165syntax region muttrcGreetingFormatString contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcGreetingFormatEscapes,muttrcGreetingFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
166syntax region muttrcGroupIndexFormatString contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcGroupIndexFormatEscapes,muttrcGroupIndexFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
167syntax region muttrcGroupIndexFormatString contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcGroupIndexFormatEscapes,muttrcGroupIndexFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
168syntax region muttrcHistoryFormatString contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcHistoryFormatEscapes,muttrcHistoryFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
169syntax region muttrcHistoryFormatString contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcHistoryFormatEscapes,muttrcHistoryFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
170syntax region muttrcIndexFormatString contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcIndexFormatEscapes,muttrcIndexFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
171syntax region muttrcIndexFormatString contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcIndexFormatEscapes,muttrcIndexFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
172syntax region muttrcPatternFormatString contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPatternFormatEscapes,muttrcPatternFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
173syntax region muttrcPatternFormatString contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPatternFormatEscapes,muttrcPatternFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
174syntax region muttrcPgpCommandFormatString contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPgpCommandFormatEscapes,muttrcPgpCommandFormatConditionals,muttrcVariable,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
175syntax region muttrcPgpCommandFormatString contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPgpCommandFormatEscapes,muttrcPgpCommandFormatConditionals,muttrcVariable,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
176syntax region muttrcPgpEntryFormatString contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPgpEntryFormatEscapes,muttrcPgpEntryFormatConditionals,muttrcFormatErrors,muttrcPgpTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
177syntax region muttrcPgpEntryFormatString contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPgpEntryFormatEscapes,muttrcPgpEntryFormatConditionals,muttrcFormatErrors,muttrcPgpTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
178syntax region muttrcQueryFormatString contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcQueryFormatEscapes,muttrcQueryFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
179syntax region muttrcQueryFormatString contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcQueryFormatEscapes,muttrcQueryFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
180syntax region muttrcSidebarFormatString contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcSidebarFormatEscapes,muttrcSidebarFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
181syntax region muttrcSidebarFormatString contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcSidebarFormatEscapes,muttrcSidebarFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
182syntax region muttrcSmimeCommandFormatString contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcSmimeCommandFormatEscapes,muttrcSmimeCommandFormatConditionals,muttrcVariable,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
183syntax region muttrcSmimeCommandFormatString contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcSmimeCommandFormatEscapes,muttrcSmimeCommandFormatConditionals,muttrcVariable,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
184syntax region muttrcStatusFormatString contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcStatusFormatEscapes,muttrcStatusFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
185syntax region muttrcStatusFormatString contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcStatusFormatEscapes,muttrcStatusFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
186syntax region muttrcStrftimeFormatString contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcStrftimeEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
187syntax region muttrcStrftimeFormatString contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcStrftimeEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
188
189" Format escapes and conditionals
190syntax match muttrcFormatConditionals2 contained /[^?]*?/
191
192syntax region muttrcPgpTimeEscapes contained start=+%\[+ end=+\]+ contains=muttrcStrftimeEscapes
Bram Moolenaare46a4402020-06-30 20:38:27 +0200193syntax region muttrcTimeEscapes contained start=+%(+ end=+)+ contains=muttrcStrftimeEscapes
194syntax region muttrcTimeEscapes contained start=+%<+ end=+>+ contains=muttrcStrftimeEscapes
195syntax region muttrcTimeEscapes contained start=+%\[+ end=+\]+ contains=muttrcStrftimeEscapes
196syntax region muttrcTimeEscapes contained start=+%{+ end=+}+ contains=muttrcStrftimeEscapes
Bram Moolenaar01164a62017-11-02 22:58:42 +0100197
Richard Russona2aa9212024-10-13 19:40:43 +0200198syntax match muttrcVarEqualsAliasFormat contained skipwhite "=" nextgroup=muttrcAliasFormatString
199syntax match muttrcVarEqualsAttachFormat contained skipwhite "=" nextgroup=muttrcAttachFormatString
200syntax match muttrcVarEqualsAutocryptFormat contained skipwhite "=" nextgroup=muttrcAutocryptFormatString
201syntax match muttrcVarEqualsComposeFormat contained skipwhite "=" nextgroup=muttrcComposeFormatString
202syntax match muttrcVarEqualsFolderFormat contained skipwhite "=" nextgroup=muttrcFolderFormatString
203syntax match muttrcVarEqualsGreetingFormat contained skipwhite "=" nextgroup=muttrcGreetingFormatString
204syntax match muttrcVarEqualsGroupIndexFormat contained skipwhite "=" nextgroup=muttrcGroupIndexFormatString
205syntax match muttrcVarEqualsHistoryFormat contained skipwhite "=" nextgroup=muttrcHistoryFormatString
206syntax match muttrcVarEqualsIndexFormat contained skipwhite "=" nextgroup=muttrcIndexFormatString
207syntax match muttrcVarEqualsPatternFormat contained skipwhite "=" nextgroup=muttrcPatternFormatString
208syntax match muttrcVarEqualsPgpCommandFormat contained skipwhite "=" nextgroup=muttrcPgpCommandFormatString
209syntax match muttrcVarEqualsPgpEntryFormat contained skipwhite "=" nextgroup=muttrcPgpEntryFormatString
210syntax match muttrcVarEqualsQueryFormat contained skipwhite "=" nextgroup=muttrcQueryFormatString
211syntax match muttrcVarEqualsSidebarFormat contained skipwhite "=" nextgroup=muttrcSidebarFormatString
212syntax match muttrcVarEqualsSmimeCommandFormat contained skipwhite "=" nextgroup=muttrcSmimeCommandFormatString
213syntax match muttrcVarEqualsStatusFormat contained skipwhite "=" nextgroup=muttrcStatusFormatString
214syntax match muttrcVarEqualsStrftimeFormat contained skipwhite "=" nextgroup=muttrcStrftimeFormatString
Bram Moolenaar01164a62017-11-02 22:58:42 +0100215
Richard Russona2aa9212024-10-13 19:40:43 +0200216syntax match muttrcVPrefix contained /[?&]/ nextgroup=muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
Bram Moolenaar01164a62017-11-02 22:58:42 +0100217
Richard Russona2aa9212024-10-13 19:40:43 +0200218" CHECKED 2024 Oct 12
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +0100219" List of the different screens in NeoMutt (see MenuNames in menu/type.c)
Richard Russona2aa9212024-10-13 19:40:43 +0200220syntax keyword muttrcMenu contained alias attach autocrypt browser compose dialog editor generic index key_select_pgp key_select_smime pager pgp postpone query smime
Bram Moolenaar01164a62017-11-02 22:58:42 +0100221syntax match muttrcMenuList "\S\+" contained contains=muttrcMenu
222syntax match muttrcMenuCommas /,/ contained
223
Bram Moolenaar01164a62017-11-02 22:58:42 +0100224syntax region muttrcSpamPattern contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPattern nextgroup=muttrcString,muttrcStringNL
225syntax region muttrcSpamPattern contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPattern nextgroup=muttrcString,muttrcStringNL
226
227syntax region muttrcNoSpamPattern contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPattern
228syntax region muttrcNoSpamPattern contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPattern
229
230syntax match muttrcAttachmentsMimeType contained "[*a-z0-9_-]\+/[*a-z0-9._-]\+\s*" skipwhite nextgroup=muttrcAttachmentsMimeType
231syntax match muttrcAttachmentsFlag contained "[+-]\%([AI]\|inline\|attachment\)\s\+" skipwhite nextgroup=muttrcAttachmentsMimeType
232syntax match muttrcAttachmentsLine "^\s*\%(un\)\?attachments\s\+" skipwhite nextgroup=muttrcAttachmentsFlag
233
234syntax match muttrcUnHighlightSpace contained "\%(\s\+\|\\$\)"
235
236syntax keyword muttrcAsterisk contained *
Bram Moolenaar403f3eb2019-11-20 22:31:13 +0100237
Bram Moolenaar01164a62017-11-02 22:58:42 +0100238syntax keyword muttrcListsKeyword lists skipwhite nextgroup=muttrcGroupDef,muttrcComment
239syntax keyword muttrcListsKeyword unlists skipwhite nextgroup=muttrcAsterisk,muttrcComment
240
Bram Moolenaar403f3eb2019-11-20 22:31:13 +0100241syntax keyword muttrcSubscribeKeyword subscribe skipwhite nextgroup=muttrcGroupDef,muttrcComment
242syntax keyword muttrcSubscribeKeyword unsubscribe skipwhite nextgroup=muttrcAsterisk,muttrcComment
Bram Moolenaar01164a62017-11-02 22:58:42 +0100243
244syntax keyword muttrcAlternateKeyword contained alternates unalternates
245syntax region muttrcAlternatesLine keepend start=+^\s*\%(un\)\?alternates\s+ skip=+\\$+ end=+$+ contains=muttrcAlternateKeyword,muttrcGroupDef,muttrcRXPat,muttrcUnHighlightSpace,muttrcComment
246
Bram Moolenaar403f3eb2019-11-20 22:31:13 +0100247" muttrcVariable includes a prefix because partial strings are considered valid.
Bram Moolenaar01164a62017-11-02 22:58:42 +0100248syntax match muttrcVariable contained "\\\@<![a-zA-Z_-]*\$[a-zA-Z_-]\+" contains=muttrcVariableInner
249syntax match muttrcVariableInner contained "\$[a-zA-Z_-]\+"
250syntax match muttrcEscapedVariable contained "\\\$[a-zA-Z_-]\+"
251
252syntax match muttrcBadAction contained "[^<>]\+" contains=muttrcEmail
253syntax match muttrcAction contained "<[^>]\{-}>" contains=muttrcBadAction,muttrcFunction,muttrcKeyName
254
Richard Russona2aa9212024-10-13 19:40:43 +0200255" CHECKED 2024 Oct 12
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +0100256" First, hooks that take regular expressions:
Richard Russona2aa9212024-10-13 19:40:43 +0200257syntax match muttrcRXHookNot contained /!\s*/ skipwhite nextgroup=muttrcRXHookString,muttrcRXHookStringNL
258syntax match muttrcRXHookNoRegex contained /-noregex/ skipwhite nextgroup=muttrcRXHookString,muttrcRXHookStringNL
259syntax match muttrcRXHooks /\<\%(account\|append\|close\|crypt\|open\|pgp\|shutdown\|startup\|timeout\)-hook\>/ skipwhite nextgroup=muttrcRXHookNot,muttrcRXHookString,muttrcRXHookStringNL
260syntax match muttrcRXHooks /\<\%(folder\|mbox\)-hook\>/ skipwhite nextgroup=muttrcRXHookNoRegex,muttrcRXHookNot,muttrcRXHookString,muttrcRXHookStringNL
Bram Moolenaar01164a62017-11-02 22:58:42 +0100261
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +0100262" Now, hooks that take patterns
Bram Moolenaar01164a62017-11-02 22:58:42 +0100263syntax match muttrcPatHookNot contained /!\s*/ skipwhite nextgroup=muttrcPattern
Bram Moolenaare46a4402020-06-30 20:38:27 +0200264syntax match muttrcPatHooks /\<\%(charset\|iconv\|index-format\)-hook\>/ skipwhite nextgroup=muttrcPatHookNot,muttrcPattern
Bram Moolenaar01164a62017-11-02 22:58:42 +0100265syntax match muttrcPatHooks /\<\%(message\|reply\|send\|send2\|save\|fcc\|fcc-save\)-hook\>/ skipwhite nextgroup=muttrcPatHookNot,muttrcOptPattern
266
Bram Moolenaare46a4402020-06-30 20:38:27 +0200267" Global hooks that take a command
268syntax keyword muttrcHooks skipwhite shutdown-hook startup-hook timeout-hook nextgroup=muttrcCommand
269
Richard Russona2aa9212024-10-13 19:40:43 +0200270syntax match muttrcBindFunction contained /\S\+\>/ skipwhite contains=muttrcFunction
Bram Moolenaar01164a62017-11-02 22:58:42 +0100271syntax match muttrcBindFunctionNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcBindFunction,muttrcBindFunctionNL
Richard Russona2aa9212024-10-13 19:40:43 +0200272syntax match muttrcBindKey contained /\S\+/ skipwhite contains=muttrcKey nextgroup=muttrcBindFunction,muttrcBindFunctionNL
273syntax match muttrcBindKeyNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcBindKey,muttrcBindKeyNL
274syntax match muttrcBindMenuList contained /\S\+/ skipwhite contains=muttrcMenu,muttrcMenuCommas nextgroup=muttrcBindKey,muttrcBindKeyNL
Bram Moolenaar01164a62017-11-02 22:58:42 +0100275syntax match muttrcBindMenuListNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcBindMenuList,muttrcBindMenuListNL
276
277syntax region muttrcMacroDescr contained keepend skipwhite start=+\s*\S+ms=e skip=+\\ + end=+ \|$+me=s
278syntax region muttrcMacroDescr contained keepend skipwhite start=+'+ms=e skip=+\\'+ end=+'+me=s
279syntax region muttrcMacroDescr contained keepend skipwhite start=+"+ms=e skip=+\\"+ end=+"+me=s
280syntax match muttrcMacroDescrNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcMacroDescr,muttrcMacroDescrNL
281syntax region muttrcMacroBody contained skipwhite start="\S" skip='\\ \|\\$' end=' \|$' contains=muttrcEscape,muttrcSet,muttrcUnset,muttrcReset,muttrcToggle,muttrcCommand,muttrcAction nextgroup=muttrcMacroDescr,muttrcMacroDescrNL
Bram Moolenaare46a4402020-06-30 20:38:27 +0200282syntax 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
283syntax 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
Bram Moolenaar01164a62017-11-02 22:58:42 +0100284syntax match muttrcMacroBodyNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcMacroBody,muttrcMacroBodyNL
285syntax match muttrcMacroKey contained /\S\+/ skipwhite contains=muttrcKey nextgroup=muttrcMacroBody,muttrcMacroBodyNL
286syntax match muttrcMacroKeyNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcMacroKey,muttrcMacroKeyNL
287syntax match muttrcMacroMenuList contained /\S\+/ skipwhite contains=muttrcMenu,muttrcMenuCommas nextgroup=muttrcMacroKey,muttrcMacroKeyNL
288syntax match muttrcMacroMenuListNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcMacroMenuList,muttrcMacroMenuListNL
289
290syntax match muttrcAddrContent contained "[a-zA-Z0-9._-]\+@[a-zA-Z0-9./-]\+\s*" skipwhite contains=muttrcEmail nextgroup=muttrcAddrContent
291syntax region muttrcAddrContent contained start=+'+ end=+'\s*+ skip=+\\'+ skipwhite contains=muttrcEmail nextgroup=muttrcAddrContent
292syntax region muttrcAddrContent contained start=+"+ end=+"\s*+ skip=+\\"+ skipwhite contains=muttrcEmail nextgroup=muttrcAddrContent
Bram Moolenaare46a4402020-06-30 20:38:27 +0200293syntax match muttrcAddrDef contained "-addr\s\+" skipwhite nextgroup=muttrcAddrContent
Bram Moolenaar01164a62017-11-02 22:58:42 +0100294
295syntax match muttrcGroupFlag contained "-group"
296syntax region muttrcGroupDef contained start="-group\s\+" skip="\\$" end="\s" skipwhite keepend contains=muttrcGroupFlag,muttrcUnHighlightSpace
297
298syntax keyword muttrcGroupKeyword contained group ungroup
299syntax region muttrcGroupLine keepend start=+^\s*\%(un\)\?group\s+ skip=+\\$+ end=+$+ contains=muttrcGroupKeyword,muttrcGroupDef,muttrcAddrDef,muttrcRXDef,muttrcUnHighlightSpace,muttrcComment
300
301syntax match muttrcAliasGroupName contained /\w\+/ skipwhite nextgroup=muttrcAliasGroupDef,muttrcAliasKey,muttrcAliasNL
302syntax match muttrcAliasGroupDefNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasGroupName,muttrcAliasGroupDefNL
303syntax match muttrcAliasGroupDef contained /\s*-group/ skipwhite nextgroup=muttrcAliasGroupName,muttrcAliasGroupDefNL contains=muttrcGroupFlag
304syntax match muttrcAliasComma contained /,/ skipwhite nextgroup=muttrcAliasEmail,muttrcAliasEncEmail,muttrcAliasNameNoParens,muttrcAliasENNL
305syntax match muttrcAliasEmail contained /\S\+@\S\+/ contains=muttrcEmail nextgroup=muttrcAliasName,muttrcAliasNameNL skipwhite
306syntax match muttrcAliasEncEmail contained /<[^>]\+>/ contains=muttrcEmail nextgroup=muttrcAliasComma
307syntax match muttrcAliasEncEmailNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasEncEmail,muttrcAliasEncEmailNL
308syntax match muttrcAliasNameNoParens contained /[^<(@]\+\s\+/ nextgroup=muttrcAliasEncEmail,muttrcAliasEncEmailNL
309syntax region muttrcAliasName contained matchgroup=Type start=/(/ end=/)/ skipwhite
310syntax match muttrcAliasNameNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasName,muttrcAliasNameNL
311syntax match muttrcAliasENNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasEmail,muttrcAliasEncEmail,muttrcAliasNameNoParens,muttrcAliasENNL
312syntax match muttrcAliasKey contained /\s*[^- \t]\S\+/ skipwhite nextgroup=muttrcAliasEmail,muttrcAliasEncEmail,muttrcAliasNameNoParens,muttrcAliasENNL
313syntax match muttrcAliasNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasGroupDef,muttrcAliasKey,muttrcAliasNL
314
315syntax match muttrcUnAliasKey contained "\s*\w\+\s*" skipwhite nextgroup=muttrcUnAliasKey,muttrcUnAliasNL
316syntax match muttrcUnAliasNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcUnAliasKey,muttrcUnAliasNL
317
Richard Russona2aa9212024-10-13 19:40:43 +0200318" CHECKED 2024 Oct 12
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +0100319" List of letters in Flags in pattern/flags.c
Bram Moolenaare46a4402020-06-30 20:38:27 +0200320" Parameter: none
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +0100321syntax match muttrcSimplePat contained "!\?\^\?[~][ADEFGgklNOPpQRSTUuVv#$=]"
Bram Moolenaare46a4402020-06-30 20:38:27 +0200322" Parameter: range
Bram Moolenaar01164a62017-11-02 22:58:42 +0100323syntax match muttrcSimplePat contained "!\?\^\?[~][mnXz]\s*\%([<>-][0-9]\+[kM]\?\|[0-9]\+[kM]\?[-]\%([0-9]\+[kM]\?\)\?\)"
Bram Moolenaare46a4402020-06-30 20:38:27 +0200324" Parameter: date
Bram Moolenaar01164a62017-11-02 22:58:42 +0100325syntax 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
Bram Moolenaare46a4402020-06-30 20:38:27 +0200326" Parameter: regex
Richard Russona2aa9212024-10-13 19:40:43 +0200327syntax match muttrcSimplePat contained "!\?\^\?[~][BbCcefHhIiKLMstwxYy]\s*" nextgroup=muttrcSimplePatRXContainer
Bram Moolenaare46a4402020-06-30 20:38:27 +0200328" Parameter: pattern
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +0100329syntax match muttrcSimplePat contained "!\?\^\?[%][BbCcefHhiLstxy]\s*" nextgroup=muttrcSimplePatString
Bram Moolenaare46a4402020-06-30 20:38:27 +0200330" Parameter: pattern
Bram Moolenaar01164a62017-11-02 22:58:42 +0100331syntax match muttrcSimplePat contained "!\?\^\?[=][bcCefhHiLstxy]\s*" nextgroup=muttrcSimplePatString
332syntax region muttrcSimplePat contained keepend start=+!\?\^\?[~](+ end=+)+ contains=muttrcSimplePat
Bram Moolenaare46a4402020-06-30 20:38:27 +0200333
Bram Moolenaar01164a62017-11-02 22:58:42 +0100334"syn match muttrcSimplePat contained /'[^~=%][^']*/ contains=muttrcRXString
335syntax region muttrcSimplePatString contained keepend start=+"+ end=+"+ skip=+\\"+
336syntax region muttrcSimplePatString contained keepend start=+'+ end=+'+ skip=+\\'+
Bram Moolenaare46a4402020-06-30 20:38:27 +0200337syntax region muttrcSimplePatString contained keepend start=+[^ "']+ skip=+\\ + end=+\s+re=e-1
Bram Moolenaar01164a62017-11-02 22:58:42 +0100338syntax region muttrcSimplePatRXContainer contained keepend start=+"+ end=+"+ skip=+\\"+ contains=muttrcRXString
339syntax region muttrcSimplePatRXContainer contained keepend start=+'+ end=+'+ skip=+\\'+ contains=muttrcRXString
Bram Moolenaare46a4402020-06-30 20:38:27 +0200340syntax region muttrcSimplePatRXContainer contained keepend start=+[^ "']+ skip=+\\ + end=+\s+re=e-1 contains=muttrcRXString
Bram Moolenaar01164a62017-11-02 22:58:42 +0100341syntax match muttrcSimplePatMetas contained /[(|)]/
342
343syntax match muttrcOptSimplePat contained skipwhite /[~=%!(^].*/ contains=muttrcSimplePat,muttrcSimplePatMetas
344syntax match muttrcOptSimplePat contained skipwhite /[^~=%!(^].*/ contains=muttrcRXString
345syntax region muttrcOptPattern contained matchgroup=Type keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcOptSimplePat,muttrcUnHighlightSpace nextgroup=muttrcString,muttrcStringNL
346syntax region muttrcOptPattern contained matchgroup=Type keepend skipwhite start=+'+ skip=+\\'+ end=+'+ contains=muttrcOptSimplePat,muttrcUnHighlightSpace nextgroup=muttrcString,muttrcStringNL
347syntax region muttrcOptPattern contained keepend skipwhite start=+[~](+ end=+)+ skip=+\\)+ contains=muttrcSimplePat nextgroup=muttrcString,muttrcStringNL
348syntax match muttrcOptPattern contained skipwhite /[~][A-Za-z]/ contains=muttrcSimplePat nextgroup=muttrcString,muttrcStringNL
349syntax match muttrcOptPattern contained skipwhite /[.]/ nextgroup=muttrcString,muttrcStringNL
350" Keep muttrcPattern and muttrcOptPattern synchronized
351syntax region muttrcPattern contained matchgroup=Type keepend skipwhite start=+"+ skip=+\\"+ end=+"+ contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas
352syntax region muttrcPattern contained matchgroup=Type keepend skipwhite start=+'+ skip=+\\'+ end=+'+ contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas
353syntax region muttrcPattern contained keepend skipwhite start=+[~](+ end=+)+ skip=+\\)+ contains=muttrcSimplePat
354syntax match muttrcPattern contained skipwhite /[~][A-Za-z]/ contains=muttrcSimplePat
355syntax match muttrcPattern contained skipwhite /[.]/
356syntax region muttrcPatternInner contained keepend start=+"[~=%!(^]+ms=s+1 skip=+\\"+ end=+"+me=e-1 contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas
357syntax region muttrcPatternInner contained keepend start=+'[~=%!(^]+ms=s+1 skip=+\\'+ end=+'+me=e-1 contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas
358
Richard Russona2aa9212024-10-13 19:40:43 +0200359" Colour definitions takes object, foreground and background arguments (regexes excluded).
Bram Moolenaar01164a62017-11-02 22:58:42 +0100360syntax match muttrcColorMatchCount contained "[0-9]\+"
361syntax match muttrcColorMatchCountNL contained skipwhite skipnl "\s*\\$" nextgroup=muttrcColorMatchCount,muttrcColorMatchCountNL
362syntax region muttrcColorRXPat contained start=+\s*'+ skip=+\\'+ end=+'\s*+ keepend skipwhite contains=muttrcRXString2 nextgroup=muttrcColorMatchCount,muttrcColorMatchCountNL
363syntax region muttrcColorRXPat contained start=+\s*"+ skip=+\\"+ end=+"\s*+ keepend skipwhite contains=muttrcRXString2 nextgroup=muttrcColorMatchCount,muttrcColorMatchCountNL
364syntax keyword muttrcColor contained black blue cyan default green magenta red white yellow
365syntax keyword muttrcColor contained brightblack brightblue brightcyan brightdefault brightgreen brightmagenta brightred brightwhite brightyellow
Richard Russona2aa9212024-10-13 19:40:43 +0200366syntax keyword muttrcColor contained lightblack lightblue lightcyan lightdefault lightgreen lightmagenta lightred lightwhite lightyellow
367syntax keyword muttrcColor contained alertblack alertblue alertcyan alertdefault alertgreen alertmagenta alertred alertwhite alertyellow
Bram Moolenaar01164a62017-11-02 22:58:42 +0100368syntax match muttrcColor contained "\<\%(bright\)\=color\d\{1,3}\>"
Richard Russona2aa9212024-10-13 19:40:43 +0200369syntax match muttrcColor contained "#[0-9a-fA-F]\{6}\>"
370
Bram Moolenaar01164a62017-11-02 22:58:42 +0100371" Now for the structure of the color line
372syntax match muttrcColorRXNL contained skipnl "\s*\\$" nextgroup=muttrcColorRXPat,muttrcColorRXNL
Richard Russona2aa9212024-10-13 19:40:43 +0200373syntax match muttrcColorBG contained /\s*[#$]\?\w\+/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcColorRXPat,muttrcColorRXNL
Bram Moolenaar01164a62017-11-02 22:58:42 +0100374syntax match muttrcColorBGNL contained skipnl "\s*\\$" nextgroup=muttrcColorBG,muttrcColorBGNL
Richard Russona2aa9212024-10-13 19:40:43 +0200375syntax match muttrcColorFG contained /\s*[#$]\?\w\+/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcColorBG,muttrcColorBGNL
Bram Moolenaar01164a62017-11-02 22:58:42 +0100376syntax match muttrcColorFGNL contained skipnl "\s*\\$" nextgroup=muttrcColorFG,muttrcColorFGNL
Richard Russona2aa9212024-10-13 19:40:43 +0200377syntax match muttrcColorContext contained /\s*[#$]\?\w\+/ contains=muttrcColorField,muttrcVariable,muttrcUnHighlightSpace,muttrcColorCompose nextgroup=muttrcColorFG,muttrcColorFGNL
Bram Moolenaare46a4402020-06-30 20:38:27 +0200378syntax match muttrcColorNL contained skipnl "\s*\\$" nextgroup=muttrcColorContext,muttrcColorNL,muttrcColorCompose
Bram Moolenaar01164a62017-11-02 22:58:42 +0100379syntax match muttrcColorKeyword contained /^\s*color\s\+/ nextgroup=muttrcColorContext,muttrcColorNL,muttrcColorCompose
380" And now color's brother:
381syntax region muttrcUnColorPatterns contained skipwhite start=+\s*'+ end=+'+ skip=+\\'+ contains=muttrcPattern nextgroup=muttrcUnColorPatterns,muttrcUnColorPatNL
382syntax region muttrcUnColorPatterns contained skipwhite start=+\s*"+ end=+"+ skip=+\\"+ contains=muttrcPattern nextgroup=muttrcUnColorPatterns,muttrcUnColorPatNL
383syntax match muttrcUnColorPatterns contained skipwhite /\s*[^'"\s]\S\*/ contains=muttrcPattern nextgroup=muttrcUnColorPatterns,muttrcUnColorPatNL
384syntax match muttrcUnColorPatNL contained skipwhite skipnl /\s*\\$/ nextgroup=muttrcUnColorPatterns,muttrcUnColorPatNL
385syntax match muttrcUnColorAll contained skipwhite /[*]/
386syntax match muttrcUnColorAPNL contained skipwhite skipnl /\s*\\$/ nextgroup=muttrcUnColorPatterns,muttrcUnColorAll,muttrcUnColorAPNL
387syntax match muttrcUnColorIndex contained skipwhite /\s*index\s\+/ nextgroup=muttrcUnColorPatterns,muttrcUnColorAll,muttrcUnColorAPNL
388syntax match muttrcUnColorIndexNL contained skipwhite skipnl /\s*\\$/ nextgroup=muttrcUnColorIndex,muttrcUnColorIndexNL
389syntax match muttrcUnColorKeyword contained skipwhite /^\s*uncolor\s\+/ nextgroup=muttrcUnColorIndex,muttrcUnColorIndexNL
390syntax region muttrcUnColorLine keepend start=+^\s*uncolor\s+ skip=+\\$+ end=+$+ contains=muttrcUnColorKeyword,muttrcComment,muttrcUnHighlightSpace
391
Richard Russona2aa9212024-10-13 19:40:43 +0200392syntax keyword muttrcMonoAttrib contained bold italic none normal reverse standout underline
Bram Moolenaar01164a62017-11-02 22:58:42 +0100393syntax keyword muttrcMono contained mono skipwhite nextgroup=muttrcColorField,muttrcColorCompose
394syntax match muttrcMonoLine "^\s*mono\s\+\S\+" skipwhite nextgroup=muttrcMonoAttrib contains=muttrcMono
395
Richard Russona2aa9212024-10-13 19:40:43 +0200396" CHECKED 2024 Oct 12
397" List of fields in ColorFields in color/command.c
Bram Moolenaar7dda86f2018-04-20 22:36:41 +0200398syntax keyword muttrcColorField skipwhite contained
Bram Moolenaare46a4402020-06-30 20:38:27 +0200399 \ 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
Richard Russona2aa9212024-10-13 19:40:43 +0200401 \ 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
Bram Moolenaare46a4402020-06-30 20:38:27 +0200406
Bram Moolenaar01164a62017-11-02 22:58:42 +0100407syntax match muttrcColorField contained "\<quoted\d\=\>"
408
409syntax match muttrcColorCompose skipwhite contained /\s*compose\s*/ nextgroup=muttrcColorComposeField
Bram Moolenaar7dda86f2018-04-20 22:36:41 +0200410
Richard Russona2aa9212024-10-13 19:40:43 +0200411" CHECKED 2024 Oct 12
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +0100412" List of fields in ComposeColorFields in color/command.c
Bram Moolenaar01164a62017-11-02 22:58:42 +0100413syntax keyword muttrcColorComposeField skipwhite contained
Bram Moolenaare46a4402020-06-30 20:38:27 +0200414 \ header security_both security_encrypt security_none security_sign
415 \ nextgroup=muttrcColorFG,muttrcColorFGNL
Bram Moolenaar01164a62017-11-02 22:58:42 +0100416syntax region muttrcColorLine keepend start=/^\s*color\s\+/ skip=+\\$+ end=+$+ contains=muttrcColorKeyword,muttrcComment,muttrcUnHighlightSpace
417
Bram Moolenaar7dda86f2018-04-20 22:36:41 +0200418function! s:boolQuadGen(type, vars, deprecated)
Bram Moolenaar01164a62017-11-02 22:58:42 +0100419 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
Bram Moolenaare46a4402020-06-30 20:38:27 +0200427 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)
Bram Moolenaar01164a62017-11-02 22:58:42 +0100430 else
431 let l:type = a:type
Richard Russona2aa9212024-10-13 19:40:43 +0200432 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'
Bram Moolenaar01164a62017-11-02 22:58:42 +0100435 endif
436
Bram Moolenaar01164a62017-11-02 22:58:42 +0100437endfunction
438
Richard Russona2aa9212024-10-13 19:40:43 +0200439" CHECKED 2024 Oct 12
Bram Moolenaare46a4402020-06-30 20:38:27 +0200440" List of DT_BOOL in MuttVars in mutt_config.c
Bram Moolenaar01164a62017-11-02 22:58:42 +0100441call s:boolQuadGen('Bool', [
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +0100442 \ 'abort_backspace', 'allow_8bit', 'allow_ansi', 'arrow_cursor', 'ascii_chars', 'ask_bcc',
Richard Russona2aa9212024-10-13 19:40:43 +0200443 \ 'ask_cc', 'ask_followup_to', 'ask_x_comment_to', 'attach_save_without_prompting',
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +0100444 \ 'attach_split', 'autocrypt', 'autocrypt_reply', 'auto_edit', 'auto_subscribe', 'auto_tag',
Bram Moolenaare46a4402020-06-30 20:38:27 +0200445 \ 'beep', 'beep_new', 'bounce_delivered', 'braille_friendly',
Richard Russona2aa9212024-10-13 19:40:43 +0200446 \ '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',
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +0100449 \ 'confirm_append', 'confirm_create', 'copy_decode_weed', 'count_alternatives',
450 \ 'crypt_auto_encrypt', 'crypt_auto_pgp', 'crypt_auto_sign', 'crypt_auto_smime',
Richard Russona2aa9212024-10-13 19:40:43 +0200451 \ 'crypt_confirm_hook', 'crypt_encryption_info', 'crypt_opportunistic_encrypt',
Bram Moolenaare46a4402020-06-30 20:38:27 +0200452 \ 'crypt_opportunistic_encrypt_strong_keys', 'crypt_protected_headers_read',
Richard Russona2aa9212024-10-13 19:40:43 +0200453 \ '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',
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +0100465 \ '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',
Bram Moolenaare46a4402020-06-30 20:38:27 +0200473 \ 'pgp_self_encrypt', 'pgp_show_unusable', 'pgp_strict_enc', 'pgp_use_gpg_agent',
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +0100474 \ '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',
Bram Moolenaare46a4402020-06-30 20:38:27 +0200487 \ 'ssl_verify_dates', 'ssl_verify_host', 'ssl_verify_partial_chains', 'status_on_top',
488 \ 'strict_threads', 'suspend', 'text_flowed', 'thorough_search', 'thread_received', 'tilde',
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +0100489 \ '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'
Bram Moolenaare46a4402020-06-30 20:38:27 +0200492 \ ], 0)
Bram Moolenaar01164a62017-11-02 22:58:42 +0100493
Richard Russona2aa9212024-10-13 19:40:43 +0200494" CHECKED 2024 Oct 12
Bram Moolenaar01164a62017-11-02 22:58:42 +0100495" Deprecated Bools
Bram Moolenaare46a4402020-06-30 20:38:27 +0200496" List of DT_SYNONYM or DT_DEPRECATED Bools in MuttVars in mutt_config.c
Bram Moolenaar01164a62017-11-02 22:58:42 +0100497call s:boolQuadGen('Bool', [
Richard Russona2aa9212024-10-13 19:40:43 +0200498 \ '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',
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +0100507 \ 'use_8bitmime', 'virtual_spoolfile', 'xterm_set_titles'
Bram Moolenaare46a4402020-06-30 20:38:27 +0200508 \ ], 1)
Bram Moolenaar01164a62017-11-02 22:58:42 +0100509
Richard Russona2aa9212024-10-13 19:40:43 +0200510" CHECKED 2024 Oct 12
Bram Moolenaare46a4402020-06-30 20:38:27 +0200511" List of DT_QUAD in MuttVars in mutt_config.c
Bram Moolenaar01164a62017-11-02 22:58:42 +0100512call s:boolQuadGen('Quad', [
Bram Moolenaare46a4402020-06-30 20:38:27 +0200513 \ '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',
Richard Russona2aa9212024-10-13 19:40:43 +0200517 \ 'post_moderated', 'print', 'quit', 'recall', 'reply_to', 'ssl_starttls'
Bram Moolenaare46a4402020-06-30 20:38:27 +0200518 \ ], 0)
Bram Moolenaar01164a62017-11-02 22:58:42 +0100519
Richard Russona2aa9212024-10-13 19:40:43 +0200520" CHECKED 2024 Oct 12
Bram Moolenaar01164a62017-11-02 22:58:42 +0100521" Deprecated Quads
Bram Moolenaare46a4402020-06-30 20:38:27 +0200522" List of DT_SYNONYM or DT_DEPRECATED Quads in MuttVars in mutt_config.c
Bram Moolenaar01164a62017-11-02 22:58:42 +0100523call s:boolQuadGen('Quad', [
Bram Moolenaare46a4402020-06-30 20:38:27 +0200524 \ 'mime_fwd', 'pgp_encrypt_self', 'pgp_verify_sig', 'smime_encrypt_self'
525 \ ], 1)
Bram Moolenaar01164a62017-11-02 22:58:42 +0100526
Richard Russona2aa9212024-10-13 19:40:43 +0200527" CHECKED 2024 Oct 12
Bram Moolenaare46a4402020-06-30 20:38:27 +0200528" List of DT_NUMBER or DT_LONG in MuttVars in mutt_config.c
Bram Moolenaar01164a62017-11-02 22:58:42 +0100529syntax keyword muttrcVarNum skipwhite contained
Richard Russona2aa9212024-10-13 19:40:43 +0200530 \ 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
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +0100533 \ 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
Richard Russona2aa9212024-10-13 19:40:43 +0200537 \ 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
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +0100541" Deprecated Numbers
Richard Russona2aa9212024-10-13 19:40:43 +0200542syntax keyword muttrcVarDeprecatedNum
543 \ connect_timeout header_cache_pagesize imap_keepalive pop_checkinterval skip_quoted_offset
Bram Moolenaar01164a62017-11-02 22:58:42 +0100544
Richard Russona2aa9212024-10-13 19:40:43 +0200545" CHECKED 2024 Oct 12
Bram Moolenaare46a4402020-06-30 20:38:27 +0200546" List of DT_STRING in MuttVars in mutt_config.c
Bram Moolenaar01164a62017-11-02 22:58:42 +0100547" Special cases first, and all the rest at the end
Bram Moolenaar01164a62017-11-02 22:58:42 +0100548" Formats themselves must be updated in their respective groups
549" See s:escapesConditionals
Richard Russona2aa9212024-10-13 19:40:43 +0200550syntax match muttrcVarString contained skipwhite 'my_[a-zA-Z0-9_]\+' nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
551syntax keyword muttrcVarString contained skipwhite alias_format nextgroup=muttrcVarEqualsAliasFormat
552syntax keyword muttrcVarString contained skipwhite attach_format nextgroup=muttrcVarEqualsAttachFormat
553syntax keyword muttrcVarString contained skipwhite autocrypt_acct_format nextgroup=muttrcVarEqualsAutocryptFormat
554syntax keyword muttrcVarString contained skipwhite compose_format nextgroup=muttrcVarEqualsComposeFormat
555syntax keyword muttrcVarString contained skipwhite folder_format mailbox_folder_format nextgroup=muttrcVarEqualsFolderFormat
556syntax keyword muttrcVarString contained skipwhite greeting nextgroup=muttrcVarEqualsGreetingFormat
557syntax keyword muttrcVarString contained skipwhite history_format nextgroup=muttrcVarEqualsHistoryFormat
558syntax 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
562syntax keyword muttrcVarString contained skipwhite pattern_format nextgroup=muttrcVarEqualsPatternFormat
563syntax keyword muttrcVarString contained skipwhite
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +0100564 \ 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
Richard Russona2aa9212024-10-13 19:40:43 +0200568 \ nextgroup=muttrcVarEqualsPgpCommandFormat
569syntax keyword muttrcVarString contained skipwhite pgp_entry_format nextgroup=muttrcVarEqualsPgpEntryFormat
570syntax keyword muttrcVarString contained skipwhite query_format nextgroup=muttrcVarEqualsQueryFormat
571syntax keyword muttrcVarString contained skipwhite
Bram Moolenaare46a4402020-06-30 20:38:27 +0200572 \ smime_decrypt_command smime_encrypt_command smime_get_cert_command
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +0100573 \ 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
Richard Russona2aa9212024-10-13 19:40:43 +0200575 \ nextgroup=muttrcVarEqualsSmimeCommandFormat
576syntax keyword muttrcVarString contained skipwhite status_format ts_icon_format ts_status_format nextgroup=muttrcVarEqualsStatusFormat
577syntax keyword muttrcVarString contained skipwhite date_format nextgroup=muttrcVarEqualsStrftimeFormat
578syntax keyword muttrcVarString contained skipwhite group_index_format nextgroup=muttrcVarEqualsGroupIndexFormat
579syntax keyword muttrcVarString contained skipwhite sidebar_format nextgroup=muttrcVarEqualsSidebarFormat
580syntax keyword muttrcVarString contained skipwhite
Bram Moolenaare46a4402020-06-30 20:38:27 +0200581 \ abort_key arrow_string assumed_charset attach_charset attach_sep attribution_locale
Richard Russona2aa9212024-10-13 19:40:43 +0200582 \ 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
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +0100584 \ hidden_tags hostname imap_authenticators imap_delim_chars imap_headers imap_login
Richard Russona2aa9212024-10-13 19:40:43 +0200585 \ 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
Bram Moolenaare46a4402020-06-30 20:38:27 +0200596
Bram Moolenaar01164a62017-11-02 22:58:42 +0100597" Deprecated strings
Richard Russona2aa9212024-10-13 19:40:43 +0200598syntax 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
Bram Moolenaar7dda86f2018-04-20 22:36:41 +0200604
Richard Russona2aa9212024-10-13 19:40:43 +0200605" CHECKED 2024 Oct 12
Bram Moolenaar01164a62017-11-02 22:58:42 +0100606" List of DT_ADDRESS
Richard Russona2aa9212024-10-13 19:40:43 +0200607syntax keyword muttrcVarString contained skipwhite envelope_from_address from nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
Bram Moolenaar403f3eb2019-11-20 22:31:13 +0100608" List of DT_ENUM
Richard Russona2aa9212024-10-13 19:40:43 +0200609syntax keyword muttrcVarString contained skipwhite mbox_type use_threads nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
Bram Moolenaar01164a62017-11-02 22:58:42 +0100610" List of DT_MBTABLE
Richard Russona2aa9212024-10-13 19:40:43 +0200611syntax keyword muttrcVarString contained skipwhite crypt_chars flag_chars from_chars status_chars to_chars nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
Bram Moolenaar7dda86f2018-04-20 22:36:41 +0200612
Richard Russona2aa9212024-10-13 19:40:43 +0200613" CHECKED 2024 Oct 12
614" List of DT_PATH or D_STRING_MAILBOX
615syntax 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
Bram Moolenaar403f3eb2019-11-20 22:31:13 +0100621" List of DT_COMMAND (excluding pgp_*_command and smime_*_command)
Richard Russona2aa9212024-10-13 19:40:43 +0200622syntax 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
Bram Moolenaar7dda86f2018-04-20 22:36:41 +0200627
Richard Russona2aa9212024-10-13 19:40:43 +0200628" CHECKED 2024 Oct 12
Bram Moolenaar01164a62017-11-02 22:58:42 +0100629" List of DT_REGEX
Richard Russona2aa9212024-10-13 19:40:43 +0200630syntax keyword muttrcVarString contained skipwhite
631 \ abort_noattach_regex gecos_mask mask pgp_decryption_okay pgp_good_sign quote_regex
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +0100632 \ reply_regex smileys
Richard Russona2aa9212024-10-13 19:40:43 +0200633 \ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
Bram Moolenaar01164a62017-11-02 22:58:42 +0100634" List of DT_SORT
Richard Russona2aa9212024-10-13 19:40:43 +0200635syntax keyword muttrcVarString contained skipwhite
Bram Moolenaare46a4402020-06-30 20:38:27 +0200636 \ pgp_sort_keys sidebar_sort_method sort sort_alias sort_aux sort_browser
Richard Russona2aa9212024-10-13 19:40:43 +0200637 \ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
Bram Moolenaar01164a62017-11-02 22:58:42 +0100638
Richard Russona2aa9212024-10-13 19:40:43 +0200639" CHECKED 2024 Oct 12
640" List of commands in mutt_commands in commands.c
Bram Moolenaar01164a62017-11-02 22:58:42 +0100641" Remember to remove hooks, they have already been dealt with
Bram Moolenaar01164a62017-11-02 22:58:42 +0100642syntax keyword muttrcCommand skipwhite alias nextgroup=muttrcAliasGroupDef,muttrcAliasKey,muttrcAliasNL
Bram Moolenaare46a4402020-06-30 20:38:27 +0200643syntax keyword muttrcCommand skipwhite bind nextgroup=muttrcBindMenuList,muttrcBindMenuListNL
Bram Moolenaar01164a62017-11-02 22:58:42 +0100644syntax keyword muttrcCommand skipwhite exec nextgroup=muttrcFunction
Bram Moolenaare46a4402020-06-30 20:38:27 +0200645syntax keyword muttrcCommand skipwhite macro nextgroup=muttrcMacroMenuList,muttrcMacroMenuListNL
646syntax keyword muttrcCommand skipwhite nospam nextgroup=muttrcNoSpamPattern
Richard Russona2aa9212024-10-13 19:40:43 +0200647syntax keyword muttrcCommand skipwhite set unset reset toggle nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarString
Bram Moolenaare46a4402020-06-30 20:38:27 +0200648syntax keyword muttrcCommand skipwhite spam nextgroup=muttrcSpamPattern
649syntax keyword muttrcCommand skipwhite unalias nextgroup=muttrcUnAliasKey,muttrcUnAliasNL
650syntax keyword muttrcCommand skipwhite unhook nextgroup=muttrcHooks
Bram Moolenaar01164a62017-11-02 22:58:42 +0100651syntax keyword muttrcCommand skipwhite
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +0100652 \ 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
Richard Russona2aa9212024-10-13 19:40:43 +0200654 \ sidebar_pin sidebar_unpin source subjectrx subscribe-to tag-formats tag-transforms
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +0100655 \ unalternative_order unattachments unauto_view unbind uncolor unhdr_order unignore unmacro
Richard Russona2aa9212024-10-13 19:40:43 +0200656 \ 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
661syntax keyword muttrcDeprecatedCommand skipwhite
662 \ sidebar_whitelist unsidebar_whitelist
Bram Moolenaar01164a62017-11-02 22:58:42 +0100663
Bram Moolenaare46a4402020-06-30 20:38:27 +0200664function! s:genFunctions(functions)
665 for f in a:functions
666 exec 'syntax match muttrcFunction contained "\<' . l:f . '\>"'
667 endfor
668endfunction
669
Richard Russona2aa9212024-10-13 19:40:43 +0200670" CHECKED 2024 Oct 12
Bram Moolenaare46a4402020-06-30 20:38:27 +0200671" List of functions in functions.c
672" Note: 'noop' is included but is elsewhere in the source
673call s:genFunctions(['noop',
Richard Russona2aa9212024-10-13 19:40:43 +0200674 \ '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'
Bram Moolenaare46a4402020-06-30 20:38:27 +0200731 \ ])
Bram Moolenaar01164a62017-11-02 22:58:42 +0100732
Bram Moolenaar01164a62017-11-02 22:58:42 +0100733" Define the default highlighting.
734" Only when an item doesn't have highlighting yet
735
Bram Moolenaar01164a62017-11-02 22:58:42 +0100736highlight def link muttrcSetBoolAssignment Boolean
737highlight def link muttrcSetQuadAssignment Boolean
Bram Moolenaare46a4402020-06-30 20:38:27 +0200738
739highlight def link muttrcComment Comment
740
741highlight def link muttrcAlternatesLine Error
Bram Moolenaar01164a62017-11-02 22:58:42 +0100742highlight def link muttrcBadAction Error
743highlight def link muttrcBindFunction Error
744highlight def link muttrcBindMenuList Error
Bram Moolenaar01164a62017-11-02 22:58:42 +0100745highlight def link muttrcColorBG Error
Bram Moolenaare46a4402020-06-30 20:38:27 +0200746highlight def link muttrcColorContext Error
747highlight def link muttrcColorFG Error
Bram Moolenaare46a4402020-06-30 20:38:27 +0200748highlight def link muttrcColorLine Error
Richard Russona2aa9212024-10-13 19:40:43 +0200749highlight def link muttrcDeprecatedCommand Error
Bram Moolenaar01164a62017-11-02 22:58:42 +0100750highlight def link muttrcFormatErrors Error
Bram Moolenaare46a4402020-06-30 20:38:27 +0200751highlight def link muttrcGroupLine Error
Bram Moolenaare46a4402020-06-30 20:38:27 +0200752highlight def link muttrcPattern Error
Bram Moolenaare46a4402020-06-30 20:38:27 +0200753highlight def link muttrcUnColorLine Error
Bram Moolenaar01164a62017-11-02 22:58:42 +0100754highlight def link muttrcVarDeprecatedBool Error
Richard Russona2aa9212024-10-13 19:40:43 +0200755highlight def link muttrcVarDeprecatedNum Error
Bram Moolenaar01164a62017-11-02 22:58:42 +0100756highlight def link muttrcVarDeprecatedQuad Error
Richard Russona2aa9212024-10-13 19:40:43 +0200757highlight def link muttrcVarDeprecatedString Error
Bram Moolenaar01164a62017-11-02 22:58:42 +0100758
Bram Moolenaare46a4402020-06-30 20:38:27 +0200759highlight def link muttrcAliasEncEmail Identifier
760highlight def link muttrcAliasKey Identifier
761highlight def link muttrcColorCompose Identifier
762highlight def link muttrcColorComposeField Identifier
Bram Moolenaare46a4402020-06-30 20:38:27 +0200763highlight def link muttrcColorField Identifier
764highlight def link muttrcMenu Identifier
765highlight def link muttrcSimplePat Identifier
766highlight def link muttrcUnAliasKey Identifier
767highlight def link muttrcUnColorIndex Identifier
768highlight def link muttrcVarBool Identifier
769highlight def link muttrcVarNum Identifier
770highlight def link muttrcVarQuad Identifier
Richard Russona2aa9212024-10-13 19:40:43 +0200771highlight def link muttrcVarString Identifier
Bram Moolenaare46a4402020-06-30 20:38:27 +0200772
773highlight def link muttrcCommand Keyword
774
775highlight def link muttrcAction Macro
776highlight def link muttrcAliasGroupName Macro
777highlight def link muttrcFunction Macro
778highlight def link muttrcGroupDef Macro
779highlight def link muttrcSimplePatString Macro
780
781highlight def link muttrcMonoAttrib muttrcColor
782
783highlight def link muttrcAlternateKeyword muttrcCommand
784highlight def link muttrcAttachmentsLine muttrcCommand
785highlight def link muttrcColorKeyword muttrcCommand
786highlight def link muttrcGroupKeyword muttrcCommand
787highlight def link muttrcListsKeyword muttrcCommand
788highlight def link muttrcMono muttrcCommand
789highlight def link muttrcPatHooks muttrcCommand
790highlight def link muttrcRXHooks muttrcCommand
791highlight def link muttrcSubscribeKeyword muttrcCommand
792highlight def link muttrcUnColorKeyword muttrcCommand
793
794highlight def link muttrcAliasFormatEscapes muttrcEscape
795highlight def link muttrcAttachFormatEscapes muttrcEscape
Richard Russona2aa9212024-10-13 19:40:43 +0200796highlight def link muttrcAutocryptFormatEscapes muttrcEscape
Bram Moolenaare46a4402020-06-30 20:38:27 +0200797highlight def link muttrcComposeFormatEscapes muttrcEscape
798highlight def link muttrcFolderFormatEscapes muttrcEscape
Richard Russona2aa9212024-10-13 19:40:43 +0200799highlight def link muttrcGreetingFormatEscapes muttrcEscape
Bram Moolenaare46a4402020-06-30 20:38:27 +0200800highlight def link muttrcGroupIndexFormatEscapes muttrcEscape
Richard Russona2aa9212024-10-13 19:40:43 +0200801highlight def link muttrcHistoryFormatEscapes muttrcEscape
Bram Moolenaare46a4402020-06-30 20:38:27 +0200802highlight def link muttrcIndexFormatEscapes muttrcEscape
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +0100803highlight def link muttrcPatternFormatEscapes muttrcEscape
Richard Russona2aa9212024-10-13 19:40:43 +0200804highlight def link muttrcPgpCommandFormatEscapes muttrcEscape
805highlight def link muttrcPgpEntryFormatEscapes muttrcEscape
806highlight def link muttrcPgpTimeEscapes muttrcEscape
Bram Moolenaare46a4402020-06-30 20:38:27 +0200807highlight def link muttrcQueryFormatEscapes muttrcEscape
808highlight def link muttrcShellString muttrcEscape
809highlight def link muttrcSidebarFormatEscapes muttrcEscape
Richard Russona2aa9212024-10-13 19:40:43 +0200810highlight def link muttrcSmimeCommandFormatEscapes muttrcEscape
Bram Moolenaare46a4402020-06-30 20:38:27 +0200811highlight def link muttrcStatusFormatEscapes muttrcEscape
812highlight def link muttrcTimeEscapes muttrcEscape
813
Richard Russona2aa9212024-10-13 19:40:43 +0200814highlight def link muttrcAliasFormatConditionals muttrcFormatConditionals2
815highlight def link muttrcAttachFormatConditionals muttrcFormatConditionals2
816highlight def link muttrcAutocryptFormatConditionals muttrcFormatConditionals2
817highlight def link muttrcComposeFormatConditionals muttrcFormatConditionals2
818highlight def link muttrcFolderFormatConditionals muttrcFormatConditionals2
819highlight def link muttrcGreetingFormatConditionals muttrcFormatConditionals2
820highlight def link muttrcGroupIndexFormatConditionals muttrcFormatConditionals2
821highlight def link muttrcHistoryFormatConditionals muttrcFormatConditionals2
822highlight def link muttrcIndexFormatConditionals muttrcFormatConditionals2
823highlight def link muttrcPatternFormatConditionals muttrcFormatConditionals2
824highlight def link muttrcPgpCommandFormatConditionals muttrcFormatConditionals2
825highlight def link muttrcPgpEntryFormatConditionals muttrcFormatConditionals2
826highlight def link muttrcQueryFormatConditionals muttrcFormatConditionals2
827highlight def link muttrcSidebarFormatConditionals muttrcFormatConditionals2
828highlight def link muttrcSmimeCommandFormatConditionals muttrcFormatConditionals2
829highlight def link muttrcStatusFormatConditionals muttrcFormatConditionals2
Bram Moolenaare46a4402020-06-30 20:38:27 +0200830
831highlight def link muttrcAddrDef muttrcGroupFlag
832highlight def link muttrcRXDef muttrcGroupFlag
833
Richard Russona2aa9212024-10-13 19:40:43 +0200834highlight def link muttrcAliasFormatString muttrcString
835highlight def link muttrcAttachFormatString muttrcString
836highlight def link muttrcAutocryptFormatString muttrcString
837highlight def link muttrcComposeFormatString muttrcString
838highlight def link muttrcFolderFormatString muttrcString
839highlight def link muttrcGreetingFormatString muttrcString
840highlight def link muttrcGroupIndexFormatString muttrcString
841highlight def link muttrcHistoryFormatString muttrcString
842highlight def link muttrcIndexFormatString muttrcString
843highlight def link muttrcPatternFormatString muttrcString
844highlight def link muttrcPgpCommandFormatString muttrcString
845highlight def link muttrcPgpEntryFormatString muttrcString
846highlight def link muttrcQueryFormatString muttrcString
847highlight def link muttrcSidebarFormatString muttrcString
848highlight def link muttrcSmimeCommandFormatString muttrcString
849highlight def link muttrcStatusFormatString muttrcString
850highlight def link muttrcStrftimeFormatString muttrcString
Bram Moolenaare46a4402020-06-30 20:38:27 +0200851
852highlight def link muttrcSetNumAssignment Number
853
854highlight def link muttrcEmail Special
855highlight def link muttrcSimplePatMetas Special
856highlight def link muttrcSpecial Special
857highlight def link muttrcVariableInner Special
858
859highlight def link muttrcAliasEncEmailNL SpecialChar
860highlight def link muttrcAliasENNL SpecialChar
861highlight def link muttrcAliasGroupDefNL SpecialChar
862highlight def link muttrcAliasNameNL SpecialChar
863highlight def link muttrcAliasNL SpecialChar
864highlight def link muttrcBindFunctionNL SpecialChar
865highlight def link muttrcBindKeyNL SpecialChar
866highlight def link muttrcBindMenuListNL SpecialChar
867highlight def link muttrcColorBGNL SpecialChar
868highlight def link muttrcColorFGNL SpecialChar
869highlight def link muttrcColorMatchCountNL SpecialChar
870highlight def link muttrcColorNL SpecialChar
871highlight def link muttrcColorRXNL SpecialChar
872highlight def link muttrcEscape SpecialChar
873highlight def link muttrcKeyName SpecialChar
874highlight def link muttrcKeySpecial SpecialChar
875highlight def link muttrcMacroBodyNL SpecialChar
876highlight def link muttrcMacroDescrNL SpecialChar
877highlight def link muttrcMacroKeyNL SpecialChar
878highlight def link muttrcMacroMenuListNL SpecialChar
Bram Moolenaare46a4402020-06-30 20:38:27 +0200879highlight def link muttrcRXChars SpecialChar
880highlight def link muttrcStringNL SpecialChar
881highlight def link muttrcUnAliasNL SpecialChar
882highlight def link muttrcUnColorAPNL SpecialChar
883highlight def link muttrcUnColorIndexNL SpecialChar
884highlight def link muttrcUnColorPatNL SpecialChar
885
886highlight def link muttrcAttachmentsMimeType String
887highlight def link muttrcEscapedVariable String
888highlight def link muttrcMacroDescr String
889highlight def link muttrcRXPat String
890highlight def link muttrcRXString String
891highlight def link muttrcRXString2 String
892highlight def link muttrcSetStrAssignment String
893highlight def link muttrcString String
894
Bram Moolenaare46a4402020-06-30 20:38:27 +0200895highlight def link muttrcAttachmentsFlag Type
896highlight def link muttrcColor Type
897highlight def link muttrcFormatConditionals2 Type
898highlight def link muttrcGroupFlag Type
899highlight def link muttrcHeader Type
900highlight def link muttrcHooks Type
901highlight def link muttrcKey Type
902highlight def link muttrcPatHookNot Type
903highlight def link muttrcRXHookNot Type
904highlight def link muttrcStrftimeEscapes Type
905
Bram Moolenaar01164a62017-11-02 22:58:42 +0100906let b:current_syntax = "neomuttrc"
907
908let &cpo = s:cpo_save
909unlet s:cpo_save
Bram Moolenaar7dda86f2018-04-20 22:36:41 +0200910
911" vim: ts=8 noet tw=100 sw=8 sts=0 ft=vim isk+=-