blob: bd73de49ea0c757765056cd90b6a5f59f767c34d [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>
Bram Moolenaare46a4402020-06-30 20:38:27 +02005" Last Change: 2020-06-21
Bram Moolenaar01164a62017-11-02 22:58:42 +01006" Original version based on syntax/muttrc.vim
7
Bram Moolenaare46a4402020-06-30 20:38:27 +02008" This file covers NeoMutt 2020-06-19
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 "^#$"
25syntax match muttrcComment "[^\\]#.*$"lc=1
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
Bram Moolenaare46a4402020-06-30 20:38:27 +020037syntax region muttrcShellString matchgroup=muttrcEscape keepend start=+`+ skip=+\\`+ end=+`+ contains=muttrcVarStr,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
Bram Moolenaare46a4402020-06-30 20:38:27 +020070syntax match muttrcSetStrAssignment contained skipwhite /=\s*\%(\\\?\$\)\?[0-9A-Za-z_-]\+/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr contains=muttrcVariable,muttrcEscapedVariable
71syntax region muttrcSetStrAssignment contained skipwhite keepend start=+=\s*"+hs=s+1 end=+"+ skip=+\\"+ nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr contains=muttrcString
72syntax region muttrcSetStrAssignment contained skipwhite keepend start=+=\s*'+hs=s+1 end=+'+ skip=+\\'+ nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr contains=muttrcString
73syntax match muttrcSetBoolAssignment contained skipwhite /=\s*\\\?\$\w\+/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr contains=muttrcVariable,muttrcEscapedVariable
74syntax match muttrcSetBoolAssignment contained skipwhite /=\s*\%(yes\|no\)/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
75syntax match muttrcSetBoolAssignment contained skipwhite /=\s*"\%(yes\|no\)"/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
76syntax match muttrcSetBoolAssignment contained skipwhite /=\s*'\%(yes\|no\)'/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
77syntax match muttrcSetQuadAssignment contained skipwhite /=\s*\\\?\$\w\+/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr contains=muttrcVariable,muttrcEscapedVariable
78syntax match muttrcSetQuadAssignment contained skipwhite /=\s*\%(ask-\)\?\%(yes\|no\)/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
79syntax match muttrcSetQuadAssignment contained skipwhite /=\s*"\%(ask-\)\?\%(yes\|no\)"/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
80syntax match muttrcSetQuadAssignment contained skipwhite /=\s*'\%(ask-\)\?\%(yes\|no\)'/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
81syntax match muttrcSetNumAssignment contained skipwhite /=\s*\\\?\$\w\+/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr contains=muttrcVariable,muttrcEscapedVariable
82syntax match muttrcSetNumAssignment contained skipwhite /=\s*\d\+/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
83syntax match muttrcSetNumAssignment contained skipwhite /=\s*"\d\+"/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
84syntax match muttrcSetNumAssignment contained skipwhite /=\s*'\d\+'/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
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
Bram Moolenaare46a4402020-06-30 20:38:27 +0200104syntax region muttrcAliasFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcAliasFormatEscapes,muttrcAliasFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
105syntax region muttrcAliasFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcAliasFormatEscapes,muttrcAliasFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
106syntax region muttrcAttachFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcAttachFormatEscapes,muttrcAttachFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
107syntax region muttrcAttachFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcAttachFormatEscapes,muttrcAttachFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
108syntax region muttrcComposeFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcComposeFormatEscapes,muttrcComposeFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
109syntax region muttrcComposeFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcComposeFormatEscapes,muttrcComposeFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
110syntax region muttrcFolderFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcFolderFormatEscapes,muttrcFolderFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
111syntax region muttrcFolderFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcFolderFormatEscapes,muttrcFolderFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
112syntax region muttrcGroupIndexFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcGroupIndexFormatEscapes,muttrcGroupIndexFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
113syntax region muttrcGroupIndexFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcGroupIndexFormatEscapes,muttrcGroupIndexFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
114syntax region muttrcIndexFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcIndexFormatEscapes,muttrcIndexFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
115syntax region muttrcIndexFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcIndexFormatEscapes,muttrcIndexFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
116syntax region muttrcMixFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcMixFormatEscapes,muttrcMixFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
117syntax region muttrcMixFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcMixFormatEscapes,muttrcMixFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
118syntax region muttrcPGPCmdFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPGPCmdFormatEscapes,muttrcPGPCmdFormatConditionals,muttrcVariable,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
119syntax region muttrcPGPCmdFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPGPCmdFormatEscapes,muttrcPGPCmdFormatConditionals,muttrcVariable,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
120syntax region muttrcPGPFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPGPFormatEscapes,muttrcPGPFormatConditionals,muttrcFormatErrors,muttrcPGPTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
121syntax region muttrcPGPFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPGPFormatEscapes,muttrcPGPFormatConditionals,muttrcFormatErrors,muttrcPGPTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
122syntax region muttrcQueryFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcQueryFormatEscapes,muttrcQueryFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
123syntax region muttrcQueryFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcQueryFormatEscapes,muttrcQueryFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
124syntax region muttrcSidebarFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcSidebarFormatEscapes,muttrcSidebarFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
125syntax region muttrcSidebarFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcSidebarFormatEscapes,muttrcSidebarFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
126syntax region muttrcSmimeFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcSmimeFormatEscapes,muttrcSmimeFormatConditionals,muttrcVariable,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
127syntax region muttrcSmimeFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcSmimeFormatEscapes,muttrcSmimeFormatConditionals,muttrcVariable,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
128syntax region muttrcStatusFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcStatusFormatEscapes,muttrcStatusFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
129syntax region muttrcStatusFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcStatusFormatEscapes,muttrcStatusFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
130syntax region muttrcStrftimeFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcStrftimeEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
131syntax region muttrcStrftimeFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcStrftimeEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
Bram Moolenaar01164a62017-11-02 22:58:42 +0100132
133" Format escapes and conditionals
134syntax match muttrcFormatConditionals2 contained /[^?]*?/
Bram Moolenaare46a4402020-06-30 20:38:27 +0200135function! s:escapesConditionals(baseName, sequence, padding, conditional)
Bram Moolenaar01164a62017-11-02 22:58:42 +0100136 exec 'syntax match muttrc' . a:baseName . 'Escapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?\%(' . a:sequence . '\|%\)/'
Bram Moolenaare46a4402020-06-30 20:38:27 +0200137 if a:padding
Bram Moolenaar01164a62017-11-02 22:58:42 +0100138 exec 'syntax match muttrc' . a:baseName . 'Escapes contained /%[>|*]./'
139 endif
Bram Moolenaare46a4402020-06-30 20:38:27 +0200140 if a:conditional
Bram Moolenaar01164a62017-11-02 22:58:42 +0100141 exec 'syntax match muttrc' . a:baseName . 'Conditionals contained /%?\%(' . a:sequence . '\)?/ nextgroup=muttrcFormatConditionals2'
142 else
143 exec 'syntax match muttrc' . a:baseName . 'Conditionals contained /%?\%(' . a:sequence . '\)?/'
144 endif
145endfunction
146
Bram Moolenaare46a4402020-06-30 20:38:27 +0200147" CHECKED 2020-06-21
148" Ref: alias_format_str() in alias/dlgalias.c
149call s:escapesConditionals('AliasFormat', '[acfnrt]', 1, 0)
Bram Moolenaar7dda86f2018-04-20 22:36:41 +0200150" Ref: attach_format_str() in recvattach.c
Bram Moolenaar01164a62017-11-02 22:58:42 +0100151call s:escapesConditionals('AttachFormat', '[CcDdeFfIMmnQsTtuX]', 1, 1)
Bram Moolenaar7dda86f2018-04-20 22:36:41 +0200152" Ref: compose_format_str() in compose.c
Bram Moolenaare46a4402020-06-30 20:38:27 +0200153call s:escapesConditionals('ComposeFormat', '[ahlv]', 1, 1)
Bram Moolenaar7dda86f2018-04-20 22:36:41 +0200154" Ref: folder_format_str() in browser.c
Bram Moolenaar403f3eb2019-11-20 22:31:13 +0100155call s:escapesConditionals('FolderFormat', '[CDdFfgilmNnstu]', 1, 0)
Bram Moolenaare46a4402020-06-30 20:38:27 +0200156" Ref: group_index_format_str() in browser.c
157call s:escapesConditionals('GroupIndexFormat', '[CdfMNns]', 1, 1)
158" Ref: index_format_str() in hdrline.c
159call s:escapesConditionals('IndexFormat', '[AaBbCDdEefgHIiJKLlMmNnOPqRrSsTtuvWXxYyZ(<[{]\|@\i\+@\|G[a-zA-Z]\+\|Fp\=\|z[cst]\|cr\=', 1, 1)
Bram Moolenaar7dda86f2018-04-20 22:36:41 +0200160" Ref: mix_format_str() in remailer.c
Bram Moolenaare46a4402020-06-30 20:38:27 +0200161call s:escapesConditionals('MixFormat', '[acns]', 1, 0)
162" Ref: pgp_command_format_str() in ncrypt/pgpinvoke.c
163call s:escapesConditionals('PGPCmdFormat', '[afprs]', 0, 1)
Bram Moolenaar7dda86f2018-04-20 22:36:41 +0200164" Ref: crypt_format_str() in ncrypt/crypt_gpgme.c
Bram Moolenaare46a4402020-06-30 20:38:27 +0200165" Ref: pgp_entry_format_str() in ncrypt/pgpkey.c
Bram Moolenaar7dda86f2018-04-20 22:36:41 +0200166" Note: crypt_format_str() supports 'p', but pgp_entry_fmt() does not
Bram Moolenaar403f3eb2019-11-20 22:31:13 +0100167call s:escapesConditionals('PGPFormat', '[AaCcFfKkLlnptu[]', 0, 0)
Bram Moolenaare46a4402020-06-30 20:38:27 +0200168" Ref: query_format_str() in alias/dlgquery.c
169call s:escapesConditionals('QueryFormat', '[acent]', 1, 1)
170" Ref: sidebar_format_str() in sidebar.c
171call s:escapesConditionals('SidebarFormat', '[!BDdFLNnorStZ]', 1, 1)
172" Ref: smime_command_format_str() in ncrypt/smime.c
173call s:escapesConditionals('SmimeFormat', '[aCcdfiks]', 0, 1)
174" Ref: status_format_str() in status.c
175call s:escapesConditionals('StatusFormat', '[bDdFfhLlMmnoPpRrSstuVv]', 1, 1)
Bram Moolenaar7dda86f2018-04-20 22:36:41 +0200176
Bram Moolenaar01164a62017-11-02 22:58:42 +0100177syntax region muttrcPGPTimeEscapes contained start=+%\[+ end=+\]+ contains=muttrcStrftimeEscapes
Bram Moolenaare46a4402020-06-30 20:38:27 +0200178syntax region muttrcTimeEscapes contained start=+%(+ end=+)+ contains=muttrcStrftimeEscapes
179syntax region muttrcTimeEscapes contained start=+%<+ end=+>+ contains=muttrcStrftimeEscapes
180syntax region muttrcTimeEscapes contained start=+%\[+ end=+\]+ contains=muttrcStrftimeEscapes
181syntax region muttrcTimeEscapes contained start=+%{+ end=+}+ contains=muttrcStrftimeEscapes
Bram Moolenaar01164a62017-11-02 22:58:42 +0100182
Bram Moolenaar7dda86f2018-04-20 22:36:41 +0200183syntax match muttrcVarEqualsAliasFmt contained skipwhite "=" nextgroup=muttrcAliasFormatStr
184syntax match muttrcVarEqualsAttachFmt contained skipwhite "=" nextgroup=muttrcAttachFormatStr
185syntax match muttrcVarEqualsComposeFmt contained skipwhite "=" nextgroup=muttrcComposeFormatStr
186syntax match muttrcVarEqualsFolderFmt contained skipwhite "=" nextgroup=muttrcFolderFormatStr
187syntax match muttrcVarEqualsGrpIdxFmt contained skipwhite "=" nextgroup=muttrcGroupIndexFormatStr
188syntax match muttrcVarEqualsIdxFmt contained skipwhite "=" nextgroup=muttrcIndexFormatStr
189syntax match muttrcVarEqualsMixFmt contained skipwhite "=" nextgroup=muttrcMixFormatStr
190syntax match muttrcVarEqualsPGPCmdFmt contained skipwhite "=" nextgroup=muttrcPGPCmdFormatStr
191syntax match muttrcVarEqualsPGPFmt contained skipwhite "=" nextgroup=muttrcPGPFormatStr
Bram Moolenaar7dda86f2018-04-20 22:36:41 +0200192syntax match muttrcVarEqualsQueryFmt contained skipwhite "=" nextgroup=muttrcQueryFormatStr
193syntax match muttrcVarEqualsSdbFmt contained skipwhite "=" nextgroup=muttrcSidebarFormatStr
194syntax match muttrcVarEqualsSmimeFmt contained skipwhite "=" nextgroup=muttrcSmimeFormatStr
195syntax match muttrcVarEqualsStatusFmt contained skipwhite "=" nextgroup=muttrcStatusFormatStr
196syntax match muttrcVarEqualsStrftimeFmt contained skipwhite "=" nextgroup=muttrcStrftimeFormatStr
Bram Moolenaar01164a62017-11-02 22:58:42 +0100197
Bram Moolenaare46a4402020-06-30 20:38:27 +0200198syntax match muttrcVPrefix contained /[?&]/ nextgroup=muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
Bram Moolenaar01164a62017-11-02 22:58:42 +0100199
Bram Moolenaare46a4402020-06-30 20:38:27 +0200200" CHECKED 2020-06-21
Bram Moolenaar403f3eb2019-11-20 22:31:13 +0100201" List of the different screens in mutt (see Menus in keymap.c)
Bram Moolenaar7dda86f2018-04-20 22:36:41 +0200202syntax keyword muttrcMenu contained alias attach browser compose editor generic index key_select_pgp key_select_smime mix pager pgp postpone query smime
Bram Moolenaar01164a62017-11-02 22:58:42 +0100203syntax match muttrcMenuList "\S\+" contained contains=muttrcMenu
204syntax match muttrcMenuCommas /,/ contained
205
Bram Moolenaar01164a62017-11-02 22:58:42 +0100206syntax region muttrcSpamPattern contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPattern nextgroup=muttrcString,muttrcStringNL
207syntax region muttrcSpamPattern contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPattern nextgroup=muttrcString,muttrcStringNL
208
209syntax region muttrcNoSpamPattern contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPattern
210syntax region muttrcNoSpamPattern contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPattern
211
212syntax match muttrcAttachmentsMimeType contained "[*a-z0-9_-]\+/[*a-z0-9._-]\+\s*" skipwhite nextgroup=muttrcAttachmentsMimeType
213syntax match muttrcAttachmentsFlag contained "[+-]\%([AI]\|inline\|attachment\)\s\+" skipwhite nextgroup=muttrcAttachmentsMimeType
214syntax match muttrcAttachmentsLine "^\s*\%(un\)\?attachments\s\+" skipwhite nextgroup=muttrcAttachmentsFlag
215
216syntax match muttrcUnHighlightSpace contained "\%(\s\+\|\\$\)"
217
218syntax keyword muttrcAsterisk contained *
Bram Moolenaar403f3eb2019-11-20 22:31:13 +0100219
Bram Moolenaar01164a62017-11-02 22:58:42 +0100220syntax keyword muttrcListsKeyword lists skipwhite nextgroup=muttrcGroupDef,muttrcComment
221syntax keyword muttrcListsKeyword unlists skipwhite nextgroup=muttrcAsterisk,muttrcComment
222
Bram Moolenaar403f3eb2019-11-20 22:31:13 +0100223syntax keyword muttrcSubscribeKeyword subscribe skipwhite nextgroup=muttrcGroupDef,muttrcComment
224syntax keyword muttrcSubscribeKeyword unsubscribe skipwhite nextgroup=muttrcAsterisk,muttrcComment
Bram Moolenaar01164a62017-11-02 22:58:42 +0100225
226syntax keyword muttrcAlternateKeyword contained alternates unalternates
227syntax region muttrcAlternatesLine keepend start=+^\s*\%(un\)\?alternates\s+ skip=+\\$+ end=+$+ contains=muttrcAlternateKeyword,muttrcGroupDef,muttrcRXPat,muttrcUnHighlightSpace,muttrcComment
228
Bram Moolenaar403f3eb2019-11-20 22:31:13 +0100229" muttrcVariable includes a prefix because partial strings are considered valid.
Bram Moolenaar01164a62017-11-02 22:58:42 +0100230syntax match muttrcVariable contained "\\\@<![a-zA-Z_-]*\$[a-zA-Z_-]\+" contains=muttrcVariableInner
231syntax match muttrcVariableInner contained "\$[a-zA-Z_-]\+"
232syntax match muttrcEscapedVariable contained "\\\$[a-zA-Z_-]\+"
233
234syntax match muttrcBadAction contained "[^<>]\+" contains=muttrcEmail
235syntax match muttrcAction contained "<[^>]\{-}>" contains=muttrcBadAction,muttrcFunction,muttrcKeyName
236
Bram Moolenaare46a4402020-06-30 20:38:27 +0200237" CHECKED 2020-06-21
Bram Moolenaar01164a62017-11-02 22:58:42 +0100238" First, functions that take regular expressions:
239syntax match muttrcRXHookNot contained /!\s*/ skipwhite nextgroup=muttrcRXHookString,muttrcRXHookStringNL
240syntax match muttrcRXHooks /\<\%(account\|append\|close\|crypt\|folder\|mbox\|open\|pgp\)-hook\>/ skipwhite nextgroup=muttrcRXHookNot,muttrcRXHookString,muttrcRXHookStringNL
241
242" Now, functions that take patterns
243syntax match muttrcPatHookNot contained /!\s*/ skipwhite nextgroup=muttrcPattern
Bram Moolenaare46a4402020-06-30 20:38:27 +0200244syntax match muttrcPatHooks /\<\%(charset\|iconv\|index-format\)-hook\>/ skipwhite nextgroup=muttrcPatHookNot,muttrcPattern
Bram Moolenaar01164a62017-11-02 22:58:42 +0100245syntax match muttrcPatHooks /\<\%(message\|reply\|send\|send2\|save\|fcc\|fcc-save\)-hook\>/ skipwhite nextgroup=muttrcPatHookNot,muttrcOptPattern
246
Bram Moolenaare46a4402020-06-30 20:38:27 +0200247" Global hooks that take a command
248syntax keyword muttrcHooks skipwhite shutdown-hook startup-hook timeout-hook nextgroup=muttrcCommand
249
Bram Moolenaar01164a62017-11-02 22:58:42 +0100250syntax match muttrcBindFunction contained /\S\+\>/ skipwhite contains=muttrcFunction
251syntax match muttrcBindFunctionNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcBindFunction,muttrcBindFunctionNL
252syntax match muttrcBindKey contained /\S\+/ skipwhite contains=muttrcKey nextgroup=muttrcBindFunction,muttrcBindFunctionNL
253syntax match muttrcBindKeyNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcBindKey,muttrcBindKeyNL
254syntax match muttrcBindMenuList contained /\S\+/ skipwhite contains=muttrcMenu,muttrcMenuCommas nextgroup=muttrcBindKey,muttrcBindKeyNL
255syntax match muttrcBindMenuListNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcBindMenuList,muttrcBindMenuListNL
256
257syntax region muttrcMacroDescr contained keepend skipwhite start=+\s*\S+ms=e skip=+\\ + end=+ \|$+me=s
258syntax region muttrcMacroDescr contained keepend skipwhite start=+'+ms=e skip=+\\'+ end=+'+me=s
259syntax region muttrcMacroDescr contained keepend skipwhite start=+"+ms=e skip=+\\"+ end=+"+me=s
260syntax match muttrcMacroDescrNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcMacroDescr,muttrcMacroDescrNL
261syntax 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 +0200262syntax 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
263syntax 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 +0100264syntax match muttrcMacroBodyNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcMacroBody,muttrcMacroBodyNL
265syntax match muttrcMacroKey contained /\S\+/ skipwhite contains=muttrcKey nextgroup=muttrcMacroBody,muttrcMacroBodyNL
266syntax match muttrcMacroKeyNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcMacroKey,muttrcMacroKeyNL
267syntax match muttrcMacroMenuList contained /\S\+/ skipwhite contains=muttrcMenu,muttrcMenuCommas nextgroup=muttrcMacroKey,muttrcMacroKeyNL
268syntax match muttrcMacroMenuListNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcMacroMenuList,muttrcMacroMenuListNL
269
270syntax match muttrcAddrContent contained "[a-zA-Z0-9._-]\+@[a-zA-Z0-9./-]\+\s*" skipwhite contains=muttrcEmail nextgroup=muttrcAddrContent
271syntax region muttrcAddrContent contained start=+'+ end=+'\s*+ skip=+\\'+ skipwhite contains=muttrcEmail nextgroup=muttrcAddrContent
272syntax region muttrcAddrContent contained start=+"+ end=+"\s*+ skip=+\\"+ skipwhite contains=muttrcEmail nextgroup=muttrcAddrContent
Bram Moolenaare46a4402020-06-30 20:38:27 +0200273syntax match muttrcAddrDef contained "-addr\s\+" skipwhite nextgroup=muttrcAddrContent
Bram Moolenaar01164a62017-11-02 22:58:42 +0100274
275syntax match muttrcGroupFlag contained "-group"
276syntax region muttrcGroupDef contained start="-group\s\+" skip="\\$" end="\s" skipwhite keepend contains=muttrcGroupFlag,muttrcUnHighlightSpace
277
278syntax keyword muttrcGroupKeyword contained group ungroup
279syntax region muttrcGroupLine keepend start=+^\s*\%(un\)\?group\s+ skip=+\\$+ end=+$+ contains=muttrcGroupKeyword,muttrcGroupDef,muttrcAddrDef,muttrcRXDef,muttrcUnHighlightSpace,muttrcComment
280
281syntax match muttrcAliasGroupName contained /\w\+/ skipwhite nextgroup=muttrcAliasGroupDef,muttrcAliasKey,muttrcAliasNL
282syntax match muttrcAliasGroupDefNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasGroupName,muttrcAliasGroupDefNL
283syntax match muttrcAliasGroupDef contained /\s*-group/ skipwhite nextgroup=muttrcAliasGroupName,muttrcAliasGroupDefNL contains=muttrcGroupFlag
284syntax match muttrcAliasComma contained /,/ skipwhite nextgroup=muttrcAliasEmail,muttrcAliasEncEmail,muttrcAliasNameNoParens,muttrcAliasENNL
285syntax match muttrcAliasEmail contained /\S\+@\S\+/ contains=muttrcEmail nextgroup=muttrcAliasName,muttrcAliasNameNL skipwhite
286syntax match muttrcAliasEncEmail contained /<[^>]\+>/ contains=muttrcEmail nextgroup=muttrcAliasComma
287syntax match muttrcAliasEncEmailNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasEncEmail,muttrcAliasEncEmailNL
288syntax match muttrcAliasNameNoParens contained /[^<(@]\+\s\+/ nextgroup=muttrcAliasEncEmail,muttrcAliasEncEmailNL
289syntax region muttrcAliasName contained matchgroup=Type start=/(/ end=/)/ skipwhite
290syntax match muttrcAliasNameNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasName,muttrcAliasNameNL
291syntax match muttrcAliasENNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasEmail,muttrcAliasEncEmail,muttrcAliasNameNoParens,muttrcAliasENNL
292syntax match muttrcAliasKey contained /\s*[^- \t]\S\+/ skipwhite nextgroup=muttrcAliasEmail,muttrcAliasEncEmail,muttrcAliasNameNoParens,muttrcAliasENNL
293syntax match muttrcAliasNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasGroupDef,muttrcAliasKey,muttrcAliasNL
294
295syntax match muttrcUnAliasKey contained "\s*\w\+\s*" skipwhite nextgroup=muttrcUnAliasKey,muttrcUnAliasNL
296syntax match muttrcUnAliasNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcUnAliasKey,muttrcUnAliasNL
297
Bram Moolenaare46a4402020-06-30 20:38:27 +0200298" CHECKED 2020-06-21
299" List of letters in Flags in pattern.c
300" Parameter: none
301syntax match muttrcSimplePat contained "!\?\^\?[~][ADEFGgklNOPpQRSTuUvV#$=]"
302" Parameter: range
Bram Moolenaar01164a62017-11-02 22:58:42 +0100303syntax match muttrcSimplePat contained "!\?\^\?[~][mnXz]\s*\%([<>-][0-9]\+[kM]\?\|[0-9]\+[kM]\?[-]\%([0-9]\+[kM]\?\)\?\)"
Bram Moolenaare46a4402020-06-30 20:38:27 +0200304" Parameter: date
Bram Moolenaar01164a62017-11-02 22:58:42 +0100305syntax 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 +0200306" Parameter: regex
307syntax match muttrcSimplePat contained "!\?\^\?[~][BbCcefHhIiLMstwxYy]\s*" nextgroup=muttrcSimplePatRXContainer
308" Parameter: pattern
Bram Moolenaar01164a62017-11-02 22:58:42 +0100309syntax match muttrcSimplePat contained "!\?\^\?[%][bBcCefhHiLstxy]\s*" nextgroup=muttrcSimplePatString
Bram Moolenaare46a4402020-06-30 20:38:27 +0200310" Parameter: pattern
Bram Moolenaar01164a62017-11-02 22:58:42 +0100311syntax match muttrcSimplePat contained "!\?\^\?[=][bcCefhHiLstxy]\s*" nextgroup=muttrcSimplePatString
312syntax region muttrcSimplePat contained keepend start=+!\?\^\?[~](+ end=+)+ contains=muttrcSimplePat
Bram Moolenaare46a4402020-06-30 20:38:27 +0200313
Bram Moolenaar01164a62017-11-02 22:58:42 +0100314"syn match muttrcSimplePat contained /'[^~=%][^']*/ contains=muttrcRXString
315syntax region muttrcSimplePatString contained keepend start=+"+ end=+"+ skip=+\\"+
316syntax region muttrcSimplePatString contained keepend start=+'+ end=+'+ skip=+\\'+
Bram Moolenaare46a4402020-06-30 20:38:27 +0200317syntax region muttrcSimplePatString contained keepend start=+[^ "']+ skip=+\\ + end=+\s+re=e-1
Bram Moolenaar01164a62017-11-02 22:58:42 +0100318syntax region muttrcSimplePatRXContainer contained keepend start=+"+ end=+"+ skip=+\\"+ contains=muttrcRXString
319syntax region muttrcSimplePatRXContainer contained keepend start=+'+ end=+'+ skip=+\\'+ contains=muttrcRXString
Bram Moolenaare46a4402020-06-30 20:38:27 +0200320syntax region muttrcSimplePatRXContainer contained keepend start=+[^ "']+ skip=+\\ + end=+\s+re=e-1 contains=muttrcRXString
Bram Moolenaar01164a62017-11-02 22:58:42 +0100321syntax match muttrcSimplePatMetas contained /[(|)]/
322
323syntax match muttrcOptSimplePat contained skipwhite /[~=%!(^].*/ contains=muttrcSimplePat,muttrcSimplePatMetas
324syntax match muttrcOptSimplePat contained skipwhite /[^~=%!(^].*/ contains=muttrcRXString
325syntax region muttrcOptPattern contained matchgroup=Type keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcOptSimplePat,muttrcUnHighlightSpace nextgroup=muttrcString,muttrcStringNL
326syntax region muttrcOptPattern contained matchgroup=Type keepend skipwhite start=+'+ skip=+\\'+ end=+'+ contains=muttrcOptSimplePat,muttrcUnHighlightSpace nextgroup=muttrcString,muttrcStringNL
327syntax region muttrcOptPattern contained keepend skipwhite start=+[~](+ end=+)+ skip=+\\)+ contains=muttrcSimplePat nextgroup=muttrcString,muttrcStringNL
328syntax match muttrcOptPattern contained skipwhite /[~][A-Za-z]/ contains=muttrcSimplePat nextgroup=muttrcString,muttrcStringNL
329syntax match muttrcOptPattern contained skipwhite /[.]/ nextgroup=muttrcString,muttrcStringNL
330" Keep muttrcPattern and muttrcOptPattern synchronized
331syntax region muttrcPattern contained matchgroup=Type keepend skipwhite start=+"+ skip=+\\"+ end=+"+ contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas
332syntax region muttrcPattern contained matchgroup=Type keepend skipwhite start=+'+ skip=+\\'+ end=+'+ contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas
333syntax region muttrcPattern contained keepend skipwhite start=+[~](+ end=+)+ skip=+\\)+ contains=muttrcSimplePat
334syntax match muttrcPattern contained skipwhite /[~][A-Za-z]/ contains=muttrcSimplePat
335syntax match muttrcPattern contained skipwhite /[.]/
336syntax region muttrcPatternInner contained keepend start=+"[~=%!(^]+ms=s+1 skip=+\\"+ end=+"+me=e-1 contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas
337syntax region muttrcPatternInner contained keepend start=+'[~=%!(^]+ms=s+1 skip=+\\'+ end=+'+me=e-1 contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas
338
339" Colour definitions takes object, foreground and background arguments (regexps excluded).
340syntax match muttrcColorMatchCount contained "[0-9]\+"
341syntax match muttrcColorMatchCountNL contained skipwhite skipnl "\s*\\$" nextgroup=muttrcColorMatchCount,muttrcColorMatchCountNL
342syntax region muttrcColorRXPat contained start=+\s*'+ skip=+\\'+ end=+'\s*+ keepend skipwhite contains=muttrcRXString2 nextgroup=muttrcColorMatchCount,muttrcColorMatchCountNL
343syntax region muttrcColorRXPat contained start=+\s*"+ skip=+\\"+ end=+"\s*+ keepend skipwhite contains=muttrcRXString2 nextgroup=muttrcColorMatchCount,muttrcColorMatchCountNL
344syntax keyword muttrcColor contained black blue cyan default green magenta red white yellow
345syntax keyword muttrcColor contained brightblack brightblue brightcyan brightdefault brightgreen brightmagenta brightred brightwhite brightyellow
346syntax match muttrcColor contained "\<\%(bright\)\=color\d\{1,3}\>"
347" Now for the structure of the color line
348syntax match muttrcColorRXNL contained skipnl "\s*\\$" nextgroup=muttrcColorRXPat,muttrcColorRXNL
Bram Moolenaare46a4402020-06-30 20:38:27 +0200349syntax match muttrcColorBG contained /\s*[$]\?\w\+/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcColorRXPat,muttrcColorRXNL
Bram Moolenaar01164a62017-11-02 22:58:42 +0100350syntax match muttrcColorBGNL contained skipnl "\s*\\$" nextgroup=muttrcColorBG,muttrcColorBGNL
Bram Moolenaare46a4402020-06-30 20:38:27 +0200351syntax match muttrcColorFG contained /\s*[$]\?\w\+/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcColorBG,muttrcColorBGNL
Bram Moolenaar01164a62017-11-02 22:58:42 +0100352syntax match muttrcColorFGNL contained skipnl "\s*\\$" nextgroup=muttrcColorFG,muttrcColorFGNL
Bram Moolenaare46a4402020-06-30 20:38:27 +0200353syntax match muttrcColorContext contained /\s*[$]\?\w\+/ contains=muttrcColorField,muttrcVariable,muttrcUnHighlightSpace,muttrcColorCompose nextgroup=muttrcColorFG,muttrcColorFGNL
354syntax match muttrcColorNL contained skipnl "\s*\\$" nextgroup=muttrcColorContext,muttrcColorNL,muttrcColorCompose
Bram Moolenaar01164a62017-11-02 22:58:42 +0100355syntax match muttrcColorKeyword contained /^\s*color\s\+/ nextgroup=muttrcColorContext,muttrcColorNL,muttrcColorCompose
356" And now color's brother:
357syntax region muttrcUnColorPatterns contained skipwhite start=+\s*'+ end=+'+ skip=+\\'+ contains=muttrcPattern nextgroup=muttrcUnColorPatterns,muttrcUnColorPatNL
358syntax region muttrcUnColorPatterns contained skipwhite start=+\s*"+ end=+"+ skip=+\\"+ contains=muttrcPattern nextgroup=muttrcUnColorPatterns,muttrcUnColorPatNL
359syntax match muttrcUnColorPatterns contained skipwhite /\s*[^'"\s]\S\*/ contains=muttrcPattern nextgroup=muttrcUnColorPatterns,muttrcUnColorPatNL
360syntax match muttrcUnColorPatNL contained skipwhite skipnl /\s*\\$/ nextgroup=muttrcUnColorPatterns,muttrcUnColorPatNL
361syntax match muttrcUnColorAll contained skipwhite /[*]/
362syntax match muttrcUnColorAPNL contained skipwhite skipnl /\s*\\$/ nextgroup=muttrcUnColorPatterns,muttrcUnColorAll,muttrcUnColorAPNL
363syntax match muttrcUnColorIndex contained skipwhite /\s*index\s\+/ nextgroup=muttrcUnColorPatterns,muttrcUnColorAll,muttrcUnColorAPNL
364syntax match muttrcUnColorIndexNL contained skipwhite skipnl /\s*\\$/ nextgroup=muttrcUnColorIndex,muttrcUnColorIndexNL
365syntax match muttrcUnColorKeyword contained skipwhite /^\s*uncolor\s\+/ nextgroup=muttrcUnColorIndex,muttrcUnColorIndexNL
366syntax region muttrcUnColorLine keepend start=+^\s*uncolor\s+ skip=+\\$+ end=+$+ contains=muttrcUnColorKeyword,muttrcComment,muttrcUnHighlightSpace
367
368syntax keyword muttrcMonoAttrib contained bold none normal reverse standout underline
369syntax keyword muttrcMono contained mono skipwhite nextgroup=muttrcColorField,muttrcColorCompose
370syntax match muttrcMonoLine "^\s*mono\s\+\S\+" skipwhite nextgroup=muttrcMonoAttrib contains=muttrcMono
371
Bram Moolenaare46a4402020-06-30 20:38:27 +0200372" CHECKED 2020-06-21
Bram Moolenaar01164a62017-11-02 22:58:42 +0100373" List of fields in Fields in color.c
Bram Moolenaar7dda86f2018-04-20 22:36:41 +0200374syntax keyword muttrcColorField skipwhite contained
Bram Moolenaare46a4402020-06-30 20:38:27 +0200375 \ attachment attach_headers body bold error hdrdefault header index index_author
376 \ index_collapsed index_date index_flags index_label index_number index_size index_subject
377 \ index_tag index_tags indicator markers message normal options progress prompt quoted
378 \ search sidebar_divider sidebar_flagged sidebar_highlight sidebar_indicator sidebar_new
379 \ sidebar_ordinary sidebar_spoolfile sidebar_unread signature status tilde tree underline
380 \ warning nextgroup=muttrcColor
381
Bram Moolenaar01164a62017-11-02 22:58:42 +0100382syntax match muttrcColorField contained "\<quoted\d\=\>"
383
384syntax match muttrcColorCompose skipwhite contained /\s*compose\s*/ nextgroup=muttrcColorComposeField
Bram Moolenaar7dda86f2018-04-20 22:36:41 +0200385
Bram Moolenaare46a4402020-06-30 20:38:27 +0200386" CHECKED 2020-06-21
Bram Moolenaar01164a62017-11-02 22:58:42 +0100387" List of fields in ComposeFields in color.c
Bram Moolenaar01164a62017-11-02 22:58:42 +0100388syntax keyword muttrcColorComposeField skipwhite contained
Bram Moolenaare46a4402020-06-30 20:38:27 +0200389 \ header security_both security_encrypt security_none security_sign
390 \ nextgroup=muttrcColorFG,muttrcColorFGNL
Bram Moolenaar01164a62017-11-02 22:58:42 +0100391syntax region muttrcColorLine keepend start=/^\s*color\s\+/ skip=+\\$+ end=+$+ contains=muttrcColorKeyword,muttrcComment,muttrcUnHighlightSpace
392
Bram Moolenaar7dda86f2018-04-20 22:36:41 +0200393function! s:boolQuadGen(type, vars, deprecated)
Bram Moolenaar01164a62017-11-02 22:58:42 +0100394 let l:novars = copy(a:vars)
395 call map(l:novars, '"no" . v:val')
396 let l:invvars = copy(a:vars)
397 call map(l:invvars, '"inv" . v:val')
398
399 let l:orig_type = copy(a:type)
400 if a:deprecated
401 let l:type = 'Deprecated' . a:type
Bram Moolenaare46a4402020-06-30 20:38:27 +0200402 exec 'syntax keyword muttrcVar' . l:type . ' ' . join(a:vars)
403 exec 'syntax keyword muttrcVar' . l:type . ' ' . join(l:novars)
404 exec 'syntax keyword muttrcVar' . l:type . ' ' . join(l:invvars)
Bram Moolenaar01164a62017-11-02 22:58:42 +0100405 else
406 let l:type = a:type
Bram Moolenaare46a4402020-06-30 20:38:27 +0200407 exec 'syntax keyword muttrcVar' . l:type . ' skipwhite contained ' . join(a:vars) . ' nextgroup=muttrcSet' . l:orig_type . 'Assignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr'
408 exec 'syntax keyword muttrcVar' . l:type . ' skipwhite contained ' . join(l:novars) . ' nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr'
409 exec 'syntax keyword muttrcVar' . l:type . ' skipwhite contained ' . join(l:invvars) . ' nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr'
Bram Moolenaar01164a62017-11-02 22:58:42 +0100410 endif
411
Bram Moolenaar01164a62017-11-02 22:58:42 +0100412endfunction
413
Bram Moolenaare46a4402020-06-30 20:38:27 +0200414" CHECKED 2020-06-21
415" List of DT_BOOL in MuttVars in mutt_config.c
Bram Moolenaar01164a62017-11-02 22:58:42 +0100416call s:boolQuadGen('Bool', [
Bram Moolenaare46a4402020-06-30 20:38:27 +0200417 \ 'abort_backspace', 'allow_8bit', 'allow_ansi', 'arrow_cursor', 'ascii_chars', 'askbcc',
418 \ 'askcc', 'ask_follow_up', 'ask_x_comment_to', 'attach_save_without_prompting',
419 \ 'attach_split', 'autocrypt', 'autocrypt_reply', 'autoedit', 'auto_subscribe', 'auto_tag',
420 \ 'beep', 'beep_new', 'bounce_delivered', 'braille_friendly',
421 \ 'browser_abbreviate_mailboxes', 'change_folder_next', 'check_mbox_size', 'check_new',
422 \ 'collapse_all', 'collapse_flagged', 'collapse_unread', 'confirmappend', 'confirmcreate',
423 \ 'crypt_autoencrypt', 'crypt_autopgp', 'crypt_autosign', 'crypt_autosmime',
424 \ 'crypt_confirmhook', 'crypt_opportunistic_encrypt',
425 \ 'crypt_opportunistic_encrypt_strong_keys', 'crypt_protected_headers_read',
426 \ 'crypt_protected_headers_save', 'crypt_protected_headers_write', 'crypt_replyencrypt',
427 \ 'crypt_replysign', 'crypt_replysignencrypted', 'crypt_timestamp', 'crypt_use_gpgme',
428 \ 'crypt_use_pka', 'delete_untag', 'digest_collapse', 'duplicate_threads', 'edit_headers',
429 \ 'encode_from', 'fast_reply', 'fcc_before_send', 'fcc_clear', 'flag_safe', 'followup_to',
430 \ 'force_name', 'forward_decode', 'forward_decrypt', 'forward_quote', 'forward_references',
431 \ 'hdrs', 'header', 'header_color_partial', 'help', 'hidden_host', 'hide_limited',
432 \ 'hide_missing', 'hide_thread_subject', 'hide_top_limited', 'hide_top_missing',
433 \ 'history_remove_dups', 'honor_disposition', 'idn_decode', 'idn_encode',
434 \ 'ignore_list_reply_to', 'imap_check_subscribed', 'imap_condstore', 'imap_deflate',
435 \ 'imap_idle', 'imap_list_subscribed', 'imap_passive', 'imap_peek', 'imap_qresync',
436 \ 'imap_rfc5161', 'imap_servernoise', 'implicit_autoview', 'include_encrypted',
437 \ 'include_onlyfirst', 'keep_flagged', 'mailcap_sanitize', 'maildir_check_cur',
438 \ 'maildir_header_cache_verify', 'maildir_trash', 'mail_check_recent', 'mail_check_stats',
439 \ 'markers', 'mark_old', 'menu_move_off', 'menu_scroll', 'message_cache_clean', 'meta_key',
440 \ 'metoo', 'mh_purge', 'mime_forward_decode', 'mime_subject', 'mime_type_query_first',
441 \ 'narrow_tree', 'nm_record', 'nntp_listgroup', 'nntp_load_description', 'pager_stop',
442 \ 'pgp_autoinline', 'pgp_auto_decode', 'pgp_check_exit', 'pgp_check_gpg_decrypt_status_fd',
443 \ 'pgp_ignore_subkeys', 'pgp_long_ids', 'pgp_replyinline', 'pgp_retainable_sigs',
444 \ 'pgp_self_encrypt', 'pgp_show_unusable', 'pgp_strict_enc', 'pgp_use_gpg_agent',
445 \ 'pipe_decode', 'pipe_split', 'pop_auth_try_all', 'pop_last', 'postpone_encrypt',
446 \ 'print_decode', 'print_split', 'prompt_after', 'read_only', 'reflow_space_quotes',
447 \ 'reflow_text', 'reply_self', 'reply_with_xorig', 'resolve', 'resume_draft_files',
448 \ 'resume_edited_draft_files', 'reverse_alias', 'reverse_name', 'reverse_realname',
449 \ 'rfc2047_parameters', 'save_address', 'save_empty', 'save_name', 'save_unsubscribed',
450 \ 'score', 'show_new_news', 'show_only_unread', 'sidebar_folder_indent',
451 \ 'sidebar_new_mail_only', 'sidebar_next_new_wrap', 'sidebar_non_empty_mailbox_only',
452 \ 'sidebar_on_right', 'sidebar_short_path', 'sidebar_visible', 'sig_dashes', 'sig_on_top',
453 \ 'size_show_bytes', 'size_show_fractions', 'size_show_mb', 'size_units_on_left',
454 \ 'smart_wrap', 'smime_ask_cert_label', 'smime_decrypt_use_default_key', 'smime_is_default',
455 \ 'smime_self_encrypt', 'sort_re', 'ssl_force_tls', 'ssl_usesystemcerts', 'ssl_use_sslv2',
456 \ 'ssl_use_sslv3', 'ssl_use_tlsv1', 'ssl_use_tlsv1_1', 'ssl_use_tlsv1_2', 'ssl_use_tlsv1_3',
457 \ 'ssl_verify_dates', 'ssl_verify_host', 'ssl_verify_partial_chains', 'status_on_top',
458 \ 'strict_threads', 'suspend', 'text_flowed', 'thorough_search', 'thread_received', 'tilde',
459 \ 'ts_enabled', 'uncollapse_jump', 'uncollapse_new', 'user_agent', 'use_8bitmime',
460 \ 'use_domain', 'use_envelope_from', 'use_from', 'use_ipv6', 'virtual_spoolfile',
461 \ 'wait_key', 'weed', 'wrap_search', 'write_bcc', 'x_comment_to'
462 \ ], 0)
Bram Moolenaar01164a62017-11-02 22:58:42 +0100463
Bram Moolenaare46a4402020-06-30 20:38:27 +0200464" CHECKED 2020-06-21
Bram Moolenaar01164a62017-11-02 22:58:42 +0100465" Deprecated Bools
Bram Moolenaare46a4402020-06-30 20:38:27 +0200466" List of DT_SYNONYM or DT_DEPRECATED Bools in MuttVars in mutt_config.c
Bram Moolenaar01164a62017-11-02 22:58:42 +0100467call s:boolQuadGen('Bool', [
Bram Moolenaare46a4402020-06-30 20:38:27 +0200468 \ 'edit_hdrs', 'envelope_from', 'forw_decode', 'forw_decrypt', 'forw_quote',
469 \ 'header_cache_compress', 'ignore_linear_white_space', 'pgp_autoencrypt', 'pgp_autosign',
470 \ 'pgp_auto_traditional', 'pgp_create_traditional', 'pgp_replyencrypt', 'pgp_replysign',
471 \ 'pgp_replysignencrypted', 'xterm_set_titles'
472 \ ], 1)
Bram Moolenaar01164a62017-11-02 22:58:42 +0100473
Bram Moolenaare46a4402020-06-30 20:38:27 +0200474" CHECKED 2020-06-21
475" List of DT_QUAD in MuttVars in mutt_config.c
Bram Moolenaar01164a62017-11-02 22:58:42 +0100476call s:boolQuadGen('Quad', [
Bram Moolenaare46a4402020-06-30 20:38:27 +0200477 \ 'abort_noattach', 'abort_nosubject', 'abort_unmodified', 'bounce', 'catchup_newsgroup',
478 \ 'copy', 'crypt_verify_sig', 'delete', 'fcc_attach', 'followup_to_poster',
479 \ 'forward_attachments', 'forward_edit', 'honor_followup_to', 'include', 'mime_forward',
480 \ 'mime_forward_rest', 'move', 'pgp_mime_auto', 'pop_delete', 'pop_reconnect', 'postpone',
481 \ 'post_moderated', 'print', 'quit', 'recall', 'reply_to', 'ssl_starttls',
482 \ ], 0)
Bram Moolenaar01164a62017-11-02 22:58:42 +0100483
Bram Moolenaare46a4402020-06-30 20:38:27 +0200484" CHECKED 2020-06-21
Bram Moolenaar01164a62017-11-02 22:58:42 +0100485" Deprecated Quads
Bram Moolenaare46a4402020-06-30 20:38:27 +0200486" List of DT_SYNONYM or DT_DEPRECATED Quads in MuttVars in mutt_config.c
Bram Moolenaar01164a62017-11-02 22:58:42 +0100487call s:boolQuadGen('Quad', [
Bram Moolenaare46a4402020-06-30 20:38:27 +0200488 \ 'mime_fwd', 'pgp_encrypt_self', 'pgp_verify_sig', 'smime_encrypt_self'
489 \ ], 1)
Bram Moolenaar01164a62017-11-02 22:58:42 +0100490
Bram Moolenaare46a4402020-06-30 20:38:27 +0200491" CHECKED 2020-06-21
492" List of DT_NUMBER or DT_LONG in MuttVars in mutt_config.c
Bram Moolenaar01164a62017-11-02 22:58:42 +0100493syntax keyword muttrcVarNum skipwhite contained
Bram Moolenaare46a4402020-06-30 20:38:27 +0200494 \ connect_timeout debug_level header_cache_compress_level history
495 \ imap_fetch_chunk_size imap_keepalive imap_pipeline_depth imap_poll_timeout mail_check
496 \ mail_check_stats_interval menu_context net_inc nm_db_limit nm_open_timeout
497 \ nm_query_window_current_position nm_query_window_duration nntp_context nntp_poll
498 \ pager_context pager_index_lines pgp_timeout pop_checkinterval read_inc reflow_wrap
499 \ save_history score_threshold_delete score_threshold_flag score_threshold_read
500 \ search_context sendmail_wait sidebar_component_depth sidebar_width skip_quoted_offset
501 \ sleep_time smime_timeout ssl_min_dh_prime_bits timeout time_inc toggle_quoted_show_levels
502 \ wrap wrap_headers write_inc
503 \ nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
Bram Moolenaar7dda86f2018-04-20 22:36:41 +0200504syntax keyword muttrcVarDeprecatedNum contained skipwhite
Bram Moolenaare46a4402020-06-30 20:38:27 +0200505 \ header_cache_pagesize wrapmargin
506 \ nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
Bram Moolenaar01164a62017-11-02 22:58:42 +0100507
Bram Moolenaare46a4402020-06-30 20:38:27 +0200508" CHECKED 2020-06-21
509" List of DT_STRING in MuttVars in mutt_config.c
Bram Moolenaar01164a62017-11-02 22:58:42 +0100510" Special cases first, and all the rest at the end
Bram Moolenaar01164a62017-11-02 22:58:42 +0100511" Formats themselves must be updated in their respective groups
512" See s:escapesConditionals
Bram Moolenaare46a4402020-06-30 20:38:27 +0200513syntax match muttrcVarStr contained skipwhite 'my_[a-zA-Z0-9_]\+' nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
Bram Moolenaar01164a62017-11-02 22:58:42 +0100514syntax keyword muttrcVarStr contained skipwhite alias_format nextgroup=muttrcVarEqualsAliasFmt
515syntax keyword muttrcVarStr contained skipwhite attach_format nextgroup=muttrcVarEqualsAttachFmt
516syntax keyword muttrcVarStr contained skipwhite compose_format nextgroup=muttrcVarEqualsComposeFmt
517syntax keyword muttrcVarStr contained skipwhite folder_format vfolder_format nextgroup=muttrcVarEqualsFolderFmt
Bram Moolenaare46a4402020-06-30 20:38:27 +0200518syntax keyword muttrcVarStr contained skipwhite attribution forward_format index_format message_format pager_format nextgroup=muttrcVarEqualsIdxFmt
Bram Moolenaar01164a62017-11-02 22:58:42 +0100519syntax keyword muttrcVarStr contained skipwhite mix_entry_format nextgroup=muttrcVarEqualsMixFmt
Bram Moolenaar7dda86f2018-04-20 22:36:41 +0200520syntax keyword muttrcVarStr contained skipwhite
Bram Moolenaare46a4402020-06-30 20:38:27 +0200521 \ pgp_clearsign_command pgp_decode_command pgp_decrypt_command
522 \ pgp_encrypt_only_command pgp_encrypt_sign_command pgp_export_command pgp_getkeys_command
523 \ pgp_import_command pgp_list_pubring_command pgp_list_secring_command
524 \ pgp_sign_command pgp_verify_command pgp_verify_key_command
525 \ nextgroup=muttrcVarEqualsPGPCmdFmt
Bram Moolenaar01164a62017-11-02 22:58:42 +0100526syntax keyword muttrcVarStr contained skipwhite pgp_entry_format nextgroup=muttrcVarEqualsPGPFmt
Bram Moolenaar01164a62017-11-02 22:58:42 +0100527syntax keyword muttrcVarStr contained skipwhite query_format nextgroup=muttrcVarEqualsQueryFmt
528syntax keyword muttrcVarStr contained skipwhite
Bram Moolenaare46a4402020-06-30 20:38:27 +0200529 \ smime_decrypt_command smime_encrypt_command smime_get_cert_command
530 \ smime_get_cert_email_command smime_get_signer_cert_command
531 \ smime_import_cert_command smime_pk7out_command smime_sign_command
532 \ smime_verify_command smime_verify_opaque_command
533 \ nextgroup=muttrcVarEqualsSmimeFmt
534syntax keyword muttrcVarStr contained skipwhite status_format ts_icon_format ts_status_format nextgroup=muttrcVarEqualsStatusFmt
Bram Moolenaar01164a62017-11-02 22:58:42 +0100535syntax keyword muttrcVarStr contained skipwhite date_format nextgroup=muttrcVarEqualsStrftimeFmt
Bram Moolenaar7dda86f2018-04-20 22:36:41 +0200536syntax keyword muttrcVarStr contained skipwhite group_index_format nextgroup=muttrcVarEqualsGrpIdxFmt
Bram Moolenaar01164a62017-11-02 22:58:42 +0100537syntax keyword muttrcVarStr contained skipwhite sidebar_format nextgroup=muttrcVarEqualsSdbFmt
538syntax keyword muttrcVarStr contained skipwhite
Bram Moolenaare46a4402020-06-30 20:38:27 +0200539 \ abort_key arrow_string assumed_charset attach_charset attach_sep attribution_locale
540 \ autocrypt_acct_format charset config_charset content_type crypt_protected_headers_subject
541 \ default_hook dsn_notify dsn_return empty_subject escape forward_attribution_intro
542 \ forward_attribution_trailer header_cache_backend header_cache_compress_method hidden_tags
543 \ hostname imap_authenticators imap_delim_chars imap_headers imap_login imap_pass imap_user
544 \ indent_string mailcap_path mark_macro_prefix mh_seq_flagged mh_seq_replied mh_seq_unseen
545 \ newsgroups_charset news_server nm_default_url nm_exclude_tags nm_flagged_tag nm_query_type
546 \ nm_query_window_current_search nm_query_window_timebase nm_record_tags nm_replied_tag
547 \ nm_unread_tag nntp_authenticators nntp_pass nntp_user pgp_default_key pgp_sign_as pipe_sep
548 \ pop_authenticators pop_host pop_pass pop_user postpone_encrypt_as post_indent_string
549 \ preconnect preferred_languages realname send_charset show_multipart_alternative
550 \ sidebar_delim_chars sidebar_divider_char sidebar_indent_string simple_search
551 \ smime_default_key smime_encrypt_with smime_sign_as smime_sign_digest_alg
552 \ smtp_authenticators smtp_pass smtp_url smtp_user spam_separator ssl_ciphers
553 \ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
554
Bram Moolenaar01164a62017-11-02 22:58:42 +0100555" Deprecated strings
Bram Moolenaare46a4402020-06-30 20:38:27 +0200556syntax keyword muttrcVarDeprecatedStr
557 \ abort_noattach_regexp attach_keyword forw_format hdr_format indent_str msg_format
558 \ nm_default_uri pgp_self_encrypt_as post_indent_str print_cmd quote_regexp reply_regexp
559 \ smime_self_encrypt_as xterm_icon xterm_title
Bram Moolenaar7dda86f2018-04-20 22:36:41 +0200560
Bram Moolenaare46a4402020-06-30 20:38:27 +0200561" CHECKED 2020-06-21
Bram Moolenaar01164a62017-11-02 22:58:42 +0100562" List of DT_ADDRESS
Bram Moolenaare46a4402020-06-30 20:38:27 +0200563syntax keyword muttrcVarStr contained skipwhite envelope_from_address from nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
Bram Moolenaar403f3eb2019-11-20 22:31:13 +0100564" List of DT_ENUM
Bram Moolenaare46a4402020-06-30 20:38:27 +0200565syntax keyword muttrcVarStr contained skipwhite mbox_type nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
Bram Moolenaar01164a62017-11-02 22:58:42 +0100566" List of DT_MBTABLE
Bram Moolenaare46a4402020-06-30 20:38:27 +0200567syntax keyword muttrcVarStr contained skipwhite crypt_chars flag_chars from_chars status_chars to_chars nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
Bram Moolenaar7dda86f2018-04-20 22:36:41 +0200568
Bram Moolenaare46a4402020-06-30 20:38:27 +0200569" CHECKED 2020-06-21
Bram Moolenaar01164a62017-11-02 22:58:42 +0100570" List of DT_PATH
571syntax keyword muttrcVarStr contained skipwhite
Bram Moolenaare46a4402020-06-30 20:38:27 +0200572 \ alias_file attach_save_dir autocrypt_dir certificate_file debug_file
573 \ entropy_file folder header_cache history_file mbox message_cachedir newsrc
574 \ news_cache_dir postponed record signature smime_ca_location
575 \ smime_certificates smime_keys spoolfile ssl_ca_certificates_file
576 \ ssl_client_cert tmpdir trash
577 \ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
Bram Moolenaar403f3eb2019-11-20 22:31:13 +0100578" List of DT_COMMAND (excluding pgp_*_command and smime_*_command)
579syntax keyword muttrcVarStr contained skipwhite
Bram Moolenaare46a4402020-06-30 20:38:27 +0200580 \ display_filter editor inews ispell mixmaster new_mail_command pager
581 \ print_command query_command sendmail shell visual external_search_command
582 \ imap_oauth_refresh_command pop_oauth_refresh_command
583 \ mime_type_query_command smtp_oauth_refresh_command tunnel
584 \ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
Bram Moolenaar7dda86f2018-04-20 22:36:41 +0200585
Bram Moolenaare46a4402020-06-30 20:38:27 +0200586" CHECKED 2020-06-21
Bram Moolenaar01164a62017-11-02 22:58:42 +0100587" List of DT_REGEX
588syntax keyword muttrcVarStr contained skipwhite
Bram Moolenaare46a4402020-06-30 20:38:27 +0200589 \ abort_noattach_regex gecos_mask mask pgp_decryption_okay pgp_good_sign
590 \ quote_regex reply_regex smileys
591 \ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
Bram Moolenaar01164a62017-11-02 22:58:42 +0100592" List of DT_SORT
593syntax keyword muttrcVarStr contained skipwhite
Bram Moolenaare46a4402020-06-30 20:38:27 +0200594 \ pgp_sort_keys sidebar_sort_method sort sort_alias sort_aux sort_browser
595 \ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
Bram Moolenaar01164a62017-11-02 22:58:42 +0100596
Bram Moolenaare46a4402020-06-30 20:38:27 +0200597" CHECKED 2020-06-21
598" List of commands in Commands in mutt_config.c
Bram Moolenaar01164a62017-11-02 22:58:42 +0100599" Remember to remove hooks, they have already been dealt with
Bram Moolenaar01164a62017-11-02 22:58:42 +0100600syntax keyword muttrcCommand skipwhite alias nextgroup=muttrcAliasGroupDef,muttrcAliasKey,muttrcAliasNL
Bram Moolenaare46a4402020-06-30 20:38:27 +0200601syntax keyword muttrcCommand skipwhite bind nextgroup=muttrcBindMenuList,muttrcBindMenuListNL
Bram Moolenaar01164a62017-11-02 22:58:42 +0100602syntax keyword muttrcCommand skipwhite exec nextgroup=muttrcFunction
Bram Moolenaare46a4402020-06-30 20:38:27 +0200603syntax keyword muttrcCommand skipwhite macro nextgroup=muttrcMacroMenuList,muttrcMacroMenuListNL
604syntax keyword muttrcCommand skipwhite nospam nextgroup=muttrcNoSpamPattern
605syntax keyword muttrcCommand skipwhite set unset reset toggle nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
606syntax keyword muttrcCommand skipwhite spam nextgroup=muttrcSpamPattern
607syntax keyword muttrcCommand skipwhite unalias nextgroup=muttrcUnAliasKey,muttrcUnAliasNL
608syntax keyword muttrcCommand skipwhite unhook nextgroup=muttrcHooks
Bram Moolenaar01164a62017-11-02 22:58:42 +0100609syntax keyword muttrcCommand skipwhite
Bram Moolenaare46a4402020-06-30 20:38:27 +0200610 \ alternative_order attachments auto_view finish hdr_order ifdef ifndef
611 \ ignore lua lua-source mailboxes mailto_allow mime_lookup my_hdr push score
612 \ setenv sidebar_whitelist source subjectrx subscribe-to tag-formats
613 \ tag-transforms unalternative_order unattachments unauto_view uncolor
614 \ unhdr_order unignore unmailboxes unmailto_allow unmime_lookup unmono
615 \ unmy_hdr unscore unsetenv unsidebar_whitelist unsubjectrx unsubscribe-from
616 \ unvirtual-mailboxes virtual-mailboxes named-mailboxes
617 \ echo unbind unmacro
Bram Moolenaar01164a62017-11-02 22:58:42 +0100618
Bram Moolenaare46a4402020-06-30 20:38:27 +0200619function! s:genFunctions(functions)
620 for f in a:functions
621 exec 'syntax match muttrcFunction contained "\<' . l:f . '\>"'
622 endfor
623endfunction
624
625" CHECKED 2020-06-21
626" List of functions in functions.c
627" Note: 'noop' is included but is elsewhere in the source
628call s:genFunctions(['noop',
629 \ 'accept', 'append', 'attach-file', 'attach-key', 'attach-message', 'attach-news-message',
630 \ 'autocrypt-acct-menu', 'autocrypt-menu', 'backspace', 'backward-char', 'backward-word',
631 \ 'bol', 'bottom-page', 'bottom', 'bounce-message', 'break-thread', 'buffy-cycle',
632 \ 'buffy-list', 'capitalize-word', 'catchup', 'chain-next', 'chain-prev', 'change-dir',
633 \ 'change-folder-readonly', 'change-folder', 'change-newsgroup-readonly',
634 \ 'change-newsgroup', 'change-vfolder', 'check-new', 'check-stats',
635 \ 'check-traditional-pgp', 'clear-flag', 'collapse-all', 'collapse-parts',
636 \ 'collapse-thread', 'complete-query', 'complete', 'compose-to-sender', 'copy-file',
637 \ 'copy-message', 'create-account', 'create-alias', 'create-mailbox', 'current-bottom',
638 \ 'current-middle', 'current-top', 'decode-copy', 'decode-save', 'decrypt-copy',
639 \ 'decrypt-save', 'delete-account', 'delete-char', 'delete-entry', 'delete-mailbox',
640 \ 'delete-message', 'delete-pattern', 'delete-subthread', 'delete-thread', 'delete',
641 \ 'descend-directory', 'detach-file', 'display-address', 'display-filename',
642 \ 'display-message', 'display-toggle-weed', 'downcase-word', 'edit-bcc', 'edit-cc',
643 \ 'edit-description', 'edit-encoding', 'edit-fcc', 'edit-file', 'edit-followup-to',
644 \ 'edit-from', 'edit-headers', 'edit-label', 'edit-language', 'edit-message', 'edit-mime',
645 \ 'edit-newsgroups', 'edit-or-view-raw-message', 'edit-raw-message', 'edit-reply-to',
646 \ 'edit-subject', 'edit-to', 'edit-type', 'edit-x-comment-to', 'edit', 'end-cond',
647 \ 'enter-command', 'enter-mask', 'entire-thread', 'eol', 'exit', 'extract-keys',
648 \ 'fetch-mail', 'filter-entry', 'first-entry', 'flag-message', 'followup-message',
649 \ 'forget-passphrase', 'forward-char', 'forward-message', 'forward-to-group',
650 \ 'forward-word', 'get-attachment', 'get-children', 'get-message', 'get-parent',
651 \ 'goto-folder', 'goto-parent', 'group-alternatives', 'group-chat-reply',
652 \ 'group-multilingual', 'group-reply', 'half-down', 'half-up', 'help', 'history-down',
653 \ 'history-search', 'history-up', 'imap-fetch-mail', 'imap-logout-all', 'insert', 'ispell',
654 \ 'jump', 'kill-eol', 'kill-eow', 'kill-line', 'kill-word', 'last-entry',
655 \ 'limit-current-thread', 'limit', 'link-threads', 'list-reply', 'mail-key',
656 \ 'mailbox-cycle', 'mailbox-list', 'mail', 'mark-as-new', 'mark-message', 'middle-page',
657 \ 'mix', 'modify-labels-then-hide', 'modify-labels', 'modify-tags-then-hide',
658 \ 'modify-tags', 'move-down', 'move-up', 'new-mime', 'next-entry', 'next-line',
659 \ 'next-new-then-unread', 'next-new', 'next-page', 'next-subthread', 'next-thread',
660 \ 'next-undeleted', 'next-unread-mailbox', 'next-unread', 'parent-message', 'pgp-menu',
661 \ 'pipe-entry', 'pipe-message', 'post-message', 'postpone-message', 'previous-entry',
662 \ 'previous-line', 'previous-new-then-unread', 'previous-new', 'previous-page',
663 \ 'previous-subthread', 'previous-thread', 'previous-undeleted', 'previous-unread',
664 \ 'print-entry', 'print-message', 'purge-message', 'purge-thread', 'quasi-delete',
665 \ 'query-append', 'query', 'quit', 'quote-char', 'read-subthread', 'read-thread',
666 \ 'recall-message', 'reconstruct-thread', 'redraw-screen', 'refresh', 'reload-active',
667 \ 'rename-attachment', 'rename-file', 'rename-mailbox', 'reply', 'resend-message',
668 \ 'root-message', 'save-entry', 'save-message', 'search-next', 'search-opposite',
669 \ 'search-reverse', 'search-toggle', 'search', 'select-entry', 'select-new',
670 \ 'send-message', 'set-flag', 'shell-escape', 'show-limit', 'show-log-messages',
671 \ 'show-version', 'sidebar-next-new', 'sidebar-first', 'sidebar-last', 'sidebar-next',
672 \ 'sidebar-open', 'sidebar-page-down', 'sidebar-page-up', 'sidebar-prev-new',
673 \ 'sidebar-prev', 'sidebar-toggle-virtual', 'sidebar-toggle-visible', 'skip-quoted',
674 \ 'smime-menu', 'sort-mailbox', 'sort-reverse', 'sort', 'subscribe-pattern',
675 \ 'sync-mailbox', 'tag-entry', 'tag-message', 'tag-pattern', 'tag-prefix-cond',
676 \ 'tag-prefix', 'tag-subthread', 'tag-thread', 'toggle-active', 'toggle-disposition',
677 \ 'toggle-mailboxes', 'toggle-new', 'toggle-prefer-encrypt', 'toggle-quoted',
678 \ 'toggle-read', 'toggle-recode', 'toggle-subscribed', 'toggle-unlink', 'toggle-write',
679 \ 'top-page', 'top', 'transpose-chars', 'uncatchup', 'undelete-entry', 'undelete-message',
680 \ 'undelete-pattern', 'undelete-subthread', 'undelete-thread', 'unsubscribe-pattern',
681 \ 'untag-pattern', 'upcase-word', 'update-encoding', 'verify-key',
682 \ 'vfolder-from-query-readonly', 'vfolder-from-query', 'vfolder-window-backward',
683 \ 'vfolder-window-forward', 'view-attachments', 'view-attach', 'view-file', 'view-mailcap',
684 \ 'view-name', 'view-raw-message', 'view-text', 'what-key', 'write-fcc'
685 \ ])
Bram Moolenaar01164a62017-11-02 22:58:42 +0100686
Bram Moolenaar01164a62017-11-02 22:58:42 +0100687" Define the default highlighting.
688" Only when an item doesn't have highlighting yet
689
Bram Moolenaar01164a62017-11-02 22:58:42 +0100690highlight def link muttrcSetBoolAssignment Boolean
691highlight def link muttrcSetQuadAssignment Boolean
Bram Moolenaare46a4402020-06-30 20:38:27 +0200692
693highlight def link muttrcComment Comment
694
695highlight def link muttrcAlternatesLine Error
Bram Moolenaar01164a62017-11-02 22:58:42 +0100696highlight def link muttrcBadAction Error
697highlight def link muttrcBindFunction Error
698highlight def link muttrcBindMenuList Error
Bram Moolenaar01164a62017-11-02 22:58:42 +0100699highlight def link muttrcColorBG Error
Bram Moolenaar01164a62017-11-02 22:58:42 +0100700highlight def link muttrcColorBGH Error
Bram Moolenaare46a4402020-06-30 20:38:27 +0200701highlight def link muttrcColorBGI Error
702highlight def link muttrcColorContext Error
703highlight def link muttrcColorFG Error
704highlight def link muttrcColorFGH Error
705highlight def link muttrcColorFGI Error
706highlight def link muttrcColorLine Error
Bram Moolenaar01164a62017-11-02 22:58:42 +0100707highlight def link muttrcFormatErrors Error
Bram Moolenaare46a4402020-06-30 20:38:27 +0200708highlight def link muttrcGroupLine Error
709highlight def link muttrcListsLine Error
710highlight def link muttrcPattern Error
711highlight def link muttrcSubscribeLine Error
712highlight def link muttrcUnColorLine Error
Bram Moolenaar01164a62017-11-02 22:58:42 +0100713highlight def link muttrcVarDeprecatedBool Error
714highlight def link muttrcVarDeprecatedQuad Error
715highlight def link muttrcVarDeprecatedStr Error
716
Bram Moolenaare46a4402020-06-30 20:38:27 +0200717highlight def link muttrcAliasEncEmail Identifier
718highlight def link muttrcAliasKey Identifier
719highlight def link muttrcColorCompose Identifier
720highlight def link muttrcColorComposeField Identifier
721highlight def link muttrcColorContextH Identifier
722highlight def link muttrcColorContextI Identifier
723highlight def link muttrcColorField Identifier
724highlight def link muttrcMenu Identifier
725highlight def link muttrcSimplePat Identifier
726highlight def link muttrcUnAliasKey Identifier
727highlight def link muttrcUnColorIndex Identifier
728highlight def link muttrcVarBool Identifier
729highlight def link muttrcVarNum Identifier
730highlight def link muttrcVarQuad Identifier
731highlight def link muttrcVarStr Identifier
732
733highlight def link muttrcCommand Keyword
734
735highlight def link muttrcAction Macro
736highlight def link muttrcAliasGroupName Macro
737highlight def link muttrcFunction Macro
738highlight def link muttrcGroupDef Macro
739highlight def link muttrcSimplePatString Macro
740
741highlight def link muttrcMonoAttrib muttrcColor
742
743highlight def link muttrcAlternateKeyword muttrcCommand
744highlight def link muttrcAttachmentsLine muttrcCommand
745highlight def link muttrcColorKeyword muttrcCommand
746highlight def link muttrcGroupKeyword muttrcCommand
747highlight def link muttrcListsKeyword muttrcCommand
748highlight def link muttrcMono muttrcCommand
749highlight def link muttrcPatHooks muttrcCommand
750highlight def link muttrcRXHooks muttrcCommand
751highlight def link muttrcSubscribeKeyword muttrcCommand
752highlight def link muttrcUnColorKeyword muttrcCommand
753
754highlight def link muttrcAliasFormatEscapes muttrcEscape
755highlight def link muttrcAttachFormatEscapes muttrcEscape
756highlight def link muttrcComposeFormatEscapes muttrcEscape
757highlight def link muttrcFolderFormatEscapes muttrcEscape
758highlight def link muttrcGroupIndexFormatEscapes muttrcEscape
759highlight def link muttrcIndexFormatEscapes muttrcEscape
760highlight def link muttrcMixFormatEscapes muttrcEscape
761highlight def link muttrcPGPCmdFormatEscapes muttrcEscape
762highlight def link muttrcPGPFormatEscapes muttrcEscape
763highlight def link muttrcPGPTimeEscapes muttrcEscape
764highlight def link muttrcQueryFormatEscapes muttrcEscape
765highlight def link muttrcShellString muttrcEscape
766highlight def link muttrcSidebarFormatEscapes muttrcEscape
767highlight def link muttrcSmimeFormatEscapes muttrcEscape
768highlight def link muttrcStatusFormatEscapes muttrcEscape
769highlight def link muttrcTimeEscapes muttrcEscape
770
771highlight def link muttrcAliasFormatConditionals muttrcFormatConditionals2
772highlight def link muttrcAttachFormatConditionals muttrcFormatConditionals2
773highlight def link muttrcComposeFormatConditionals muttrcFormatConditionals2
774highlight def link muttrcFolderFormatConditionals muttrcFormatConditionals2
775highlight def link muttrcIndexFormatConditionals muttrcFormatConditionals2
776highlight def link muttrcMixFormatConditionals muttrcFormatConditionals2
777highlight def link muttrcPGPCmdFormatConditionals muttrcFormatConditionals2
778highlight def link muttrcPGPFormatConditionals muttrcFormatConditionals2
779highlight def link muttrcSmimeFormatConditionals muttrcFormatConditionals2
780highlight def link muttrcStatusFormatConditionals muttrcFormatConditionals2
781
782highlight def link muttrcAddrDef muttrcGroupFlag
783highlight def link muttrcRXDef muttrcGroupFlag
784
785highlight def link muttrcAliasFormatStr muttrcString
786highlight def link muttrcAttachFormatStr muttrcString
787highlight def link muttrcComposeFormatStr muttrcString
788highlight def link muttrcFolderFormatStr muttrcString
789highlight def link muttrcGroupIndexFormatStr muttrcString
790highlight def link muttrcIndexFormatStr muttrcString
791highlight def link muttrcMixFormatStr muttrcString
792highlight def link muttrcPGPCmdFormatStr muttrcString
793highlight def link muttrcPGPFormatStr muttrcString
794highlight def link muttrcQueryFormatStr muttrcString
795highlight def link muttrcSidebarFormatStr muttrcString
796highlight def link muttrcSmimeFormatStr muttrcString
797highlight def link muttrcStatusFormatStr muttrcString
798highlight def link muttrcStrftimeFormatStr muttrcString
799
800highlight def link muttrcSetNumAssignment Number
801
802highlight def link muttrcEmail Special
803highlight def link muttrcSimplePatMetas Special
804highlight def link muttrcSpecial Special
805highlight def link muttrcVariableInner Special
806
807highlight def link muttrcAliasEncEmailNL SpecialChar
808highlight def link muttrcAliasENNL SpecialChar
809highlight def link muttrcAliasGroupDefNL SpecialChar
810highlight def link muttrcAliasNameNL SpecialChar
811highlight def link muttrcAliasNL SpecialChar
812highlight def link muttrcBindFunctionNL SpecialChar
813highlight def link muttrcBindKeyNL SpecialChar
814highlight def link muttrcBindMenuListNL SpecialChar
815highlight def link muttrcColorBGNL SpecialChar
816highlight def link muttrcColorFGNL SpecialChar
817highlight def link muttrcColorMatchCountNL SpecialChar
818highlight def link muttrcColorNL SpecialChar
819highlight def link muttrcColorRXNL SpecialChar
820highlight def link muttrcEscape SpecialChar
821highlight def link muttrcKeyName SpecialChar
822highlight def link muttrcKeySpecial SpecialChar
823highlight def link muttrcMacroBodyNL SpecialChar
824highlight def link muttrcMacroDescrNL SpecialChar
825highlight def link muttrcMacroKeyNL SpecialChar
826highlight def link muttrcMacroMenuListNL SpecialChar
827highlight def link muttrcPatternNL SpecialChar
828highlight def link muttrcRXChars SpecialChar
829highlight def link muttrcStringNL SpecialChar
830highlight def link muttrcUnAliasNL SpecialChar
831highlight def link muttrcUnColorAPNL SpecialChar
832highlight def link muttrcUnColorIndexNL SpecialChar
833highlight def link muttrcUnColorPatNL SpecialChar
834
835highlight def link muttrcAttachmentsMimeType String
836highlight def link muttrcEscapedVariable String
837highlight def link muttrcMacroDescr String
838highlight def link muttrcRXPat String
839highlight def link muttrcRXString String
840highlight def link muttrcRXString2 String
841highlight def link muttrcSetStrAssignment String
842highlight def link muttrcString String
843
844highlight def link muttrcAliasParens Type
845highlight def link muttrcAttachmentsFlag Type
846highlight def link muttrcColor Type
847highlight def link muttrcFormatConditionals2 Type
848highlight def link muttrcGroupFlag Type
849highlight def link muttrcHeader Type
850highlight def link muttrcHooks Type
851highlight def link muttrcKey Type
852highlight def link muttrcPatHookNot Type
853highlight def link muttrcRXHookNot Type
854highlight def link muttrcStrftimeEscapes Type
855
Bram Moolenaar01164a62017-11-02 22:58:42 +0100856let b:current_syntax = "neomuttrc"
857
858let &cpo = s:cpo_save
859unlet s:cpo_save
Bram Moolenaar7dda86f2018-04-20 22:36:41 +0200860
861" vim: ts=8 noet tw=100 sw=8 sts=0 ft=vim isk+=-