Start anew
[msysgit.git] / share / vim / vim58 / syntax / muttrc.vim
blob3c3c9a1b883d28f7ec6a8ce577de68b0020ded42
1 " Vim syntax file
2 " Language:     Mutt setup files
3 " Maintainer:   Preben "Peppe" Guldberg (c928400@student.dtu.dk)
4 " Last Change:  Tue Jul 28 17:41:25 1998
6 " This file covers mutt version 0.74 and up (non developer)
7 " It has been updated for version 0.93i
8 " Over the time some features have vanished but are still included
9 " To get a syntax file for your specific version, see
10 "       http://www.student.dtu.dk/~c928400/vim
12 " For version 5.x: Clear all syntax items
13 " For version 6.x: Quit when a syntax file was already loaded
14 if version < 600
15   syntax clear
16 elseif exists("b:current_syntax")
17   finish
18 endif
20 " Set the keyword characters
21 if version < 600
22   set isk=@,48-57,_,-
23 else
24   setlocal isk=@,48-57,_,-
25 endif
27 syn match muttrcComment         "^#.*$"
28 syn match muttrcComment         "[^\\]#.*$"lc=1
30 " Escape sequences (back-tick and pipe goes here too)
31 syn match muttrcEscape          +\\[#tnr"'Cc]+
32 syn match muttrcEscape          +[`|]+
34 " The variables takes the following arguments
35 syn match  muttrcString         "=\s*[^ #"']\+"lc=1 contains=muttrcEscape
36 syn region muttrcString         start=+"+ms=e skip=+\\"+ end=+"+ contains=muttrcEscape,muttrcSet,muttrcCommand
37 syn region muttrcString         start=+'+ms=e skip=+\\'+ end=+'+ contains=muttrcEscape,muttrcSet,muttrcCommand
39 syn match muttrcSpecial         +\(['"]\)!\1+
41 " Numbers and Quadoptions may be surrounded by " or '
42 syn match muttrcNumber          /=\s*\d\+/lc=1
43 syn match muttrcNumber          /"=\s*\d\+"/lc=2
44 syn match muttrcNumber          /'=\s*\d\+'/lc=2
45 syn match muttrcQuadopt         +=\s*\(ask-\)\=\(yes\|no\)+lc=1
46 syn match muttrcQuadopt         +"=\s*\(ask-\)\=\(yes\|no\)"+lc=2
47 syn match muttrcQuadopt         +'=\s*\(ask-\)\=\(yes\|no\)'+lc=2
49 " Now catch some email addresses and headers (purified version from mail.vim)
50 syn match muttrcEmail           "[a-zA-Z0-9._-]\+@[a-zA-Z0-9./-]\+"
51 syn match muttrcHeader          "\<\(From\|To\|Cc\|Bcc\|Reply-To\|Subject\)\>:\="
52 syn match muttrcHeader          "\<\(Return-Path\|Received\|Date\|Replied\|Attach\)\>:\="
54 syn match   muttrcKeySpecial    contained +\(\\[Cc'"]\|\^\|\\[01]\d\{2}\)+
55 syn match   muttrcKey           contained "\S\+"                        contains=muttrcKeySpecial
56 syn region  muttrcKey           contained start=+"+ skip=+\\"+ end=+"+  contains=muttrcKeySpecial
57 syn region  muttrcKey           contained start=+'+ skip=+\\'+ end=+'+  contains=muttrcKeySpecial
58 syn match   muttrcKeyName       contained "\<f\(\d\|10\)\>"
59 syn match   muttrcKeyName       contained "\\[trne]"
60 syn match   muttrcKeyName       contained "\(<BackSpace>\|<Delete>\|<Down>\|<End>\|<Enter>\)"
61 syn match   muttrcKeyName       contained "\(<Home>\|<Insert>\|<Left>\|<PageDown>\|<PageUp>\)"
62 syn match   muttrcKeyName       contained "\(<Return>\|<Right>\|<Up>\)"
64 syn keyword muttrcVarBool       contained allow_8bit arrow_cursor ascii_chars askbcc askcc auto_tag
65 syn keyword muttrcVarBool       contained autoedit beep beep_new check_new confirmappend
66 syn keyword muttrcVarBool       contained confirmcreate edit_headers fast_reply fcc_attach
67 syn keyword muttrcVarBool       contained followup_to force_name forward_decode forward_quote hdrs
68 syn keyword muttrcVarBool       contained header help ignore_list_reply_to mark_old markers
69 syn keyword muttrcVarBool       contained menu_scroll meta_key metoo mime_forward_decode pager_stop
70 syn keyword muttrcVarBool       contained pgp_autoencrypt pgp_autosign pgp_encryptself pgp_long_ids
71 syn keyword muttrcVarBool       contained pgp_replyencrypt pgp_replysign pgp_strict_enc pipe_decode
72 syn keyword muttrcVarBool       contained pipe_split pop_delete prompt_after read_only resolve
73 syn keyword muttrcVarBool       contained reverse_alias reverse_name save_address save_empty
74 syn keyword muttrcVarBool       contained save_name sig_dashes smart_wrap sort_re status_on_top
75 syn keyword muttrcVarBool       contained strict_threads suspend thorough_search tilde use_8bitmime
76 syn keyword muttrcVarBool       contained use_domain use_from wait_key wrap_search
78 syn keyword muttrcVarBool       contained noallow_8bit noarrow_cursor noascii_chars noaskbcc noaskcc
79 syn keyword muttrcVarBool       contained noauto_tag noautoedit nobeep nobeep_new nocheck_new
80 syn keyword muttrcVarBool       contained noconfirmappend noconfirmcreate noedit_headers
81 syn keyword muttrcVarBool       contained nofast_reply nofcc_attach nofollowup_to noforce_name
82 syn keyword muttrcVarBool       contained noforward_decode noforward_quote nohdrs noheader nohelp
83 syn keyword muttrcVarBool       contained noignore_list_reply_to nomark_old nomarkers nomenu_scroll
84 syn keyword muttrcVarBool       contained nometa_key nometoo nomime_forward_decode nopager_stop
85 syn keyword muttrcVarBool       contained nopgp_autoencrypt nopgp_autosign nopgp_encryptself
86 syn keyword muttrcVarBool       contained nopgp_long_ids nopgp_replyencrypt nopgp_replysign
87 syn keyword muttrcVarBool       contained nopgp_strict_enc nopipe_decode nopipe_split nopop_delete
88 syn keyword muttrcVarBool       contained noprompt_after noread_only noresolve noreverse_alias
89 syn keyword muttrcVarBool       contained noreverse_name nosave_address nosave_empty nosave_name
90 syn keyword muttrcVarBool       contained nosig_dashes nosmart_wrap nosort_re nostatus_on_top
91 syn keyword muttrcVarBool       contained nostrict_threads nosuspend nothorough_search notilde
92 syn keyword muttrcVarBool       contained nouse_8bitmime nouse_domain nouse_from nowait_key
93 syn keyword muttrcVarBool       contained nowrap_search
95 syn keyword muttrcVarBool       contained invallow_8bit invarrow_cursor invascii_chars invaskbcc
96 syn keyword muttrcVarBool       contained invaskcc invauto_tag invautoedit invbeep invbeep_new
97 syn keyword muttrcVarBool       contained invcheck_new invconfirmappend invconfirmcreate
98 syn keyword muttrcVarBool       contained invedit_headers invfast_reply invfcc_attach invfollowup_to
99 syn keyword muttrcVarBool       contained invforce_name invforward_decode invforward_quote invhdrs
100 syn keyword muttrcVarBool       contained invheader invhelp invignore_list_reply_to invmark_old
101 syn keyword muttrcVarBool       contained invmarkers invmenu_scroll invmeta_key invmetoo
102 syn keyword muttrcVarBool       contained invmime_forward_decode invpager_stop invpgp_autoencrypt
103 syn keyword muttrcVarBool       contained invpgp_autosign invpgp_encryptself invpgp_long_ids
104 syn keyword muttrcVarBool       contained invpgp_replyencrypt invpgp_replysign invpgp_strict_enc
105 syn keyword muttrcVarBool       contained invpipe_decode invpipe_split invpop_delete invprompt_after
106 syn keyword muttrcVarBool       contained invread_only invresolve invreverse_alias invreverse_name
107 syn keyword muttrcVarBool       contained invsave_address invsave_empty invsave_name invsig_dashes
108 syn keyword muttrcVarBool       contained invsmart_wrap invsort_re invstatus_on_top
109 syn keyword muttrcVarBool       contained invstrict_threads invsuspend invthorough_search invtilde
110 syn keyword muttrcVarBool       contained invuse_8bitmime invuse_domain invuse_from invwait_key
111 syn keyword muttrcVarBool       contained invwrap_search
113 syn keyword muttrcVarQuad       contained abort_nosubject abort_unmodified copy delete include
114 syn keyword muttrcVarQuad       contained mime_forward move pgp_verify_sig postpone print quit
115 syn keyword muttrcVarQuad       contained recall reply_to use_mailcap
117 syn keyword muttrcVarQuad       contained noabort_nosubject noabort_unmodified nocopy nodelete
118 syn keyword muttrcVarQuad       contained noinclude nomime_forward nomove nopgp_verify_sig
119 syn keyword muttrcVarQuad       contained nopostpone noprint noquit norecall noreply_to
120 syn keyword muttrcVarQuad       contained nouse_mailcap
122 syn keyword muttrcVarQuad       contained invabort_nosubject invabort_unmodified invcopy invdelete
123 syn keyword muttrcVarQuad       contained invinclude invmime_forward invmove invpgp_verify_sig
124 syn keyword muttrcVarQuad       contained invpostpone invprint invquit invrecall invreply_to
125 syn keyword muttrcVarQuad       contained invuse_mailcap
127 syn keyword muttrcVarNum        contained history imap_checkinterval mail_check pager_context
128 syn keyword muttrcVarNum        contained pager_index_lines pgp_timeout pop_port read_inc
129 syn keyword muttrcVarNum        contained sendmail_wait timeout write_inc
131 syn keyword muttrcVarStr        contained alias_file alias_format alternates attribution charset
132 syn keyword muttrcVarStr        contained date_format default_hook delete_format dsn_notify
133 syn keyword muttrcVarStr        contained dsn_return edit_hdrs editor escape folder folder_format
134 syn keyword muttrcVarStr        contained forw_decode forw_format forw_quote forward_format
135 syn keyword muttrcVarStr        contained hdr_format hostname imap_pass imap_user in_reply_to
136 syn keyword muttrcVarStr        contained indent_str indent_string index_format ispell locale
137 syn keyword muttrcVarStr        contained mailcap_path mask mbox mbox_type message_format mime_fwd
138 syn keyword muttrcVarStr        contained msg_format pager pager_format pgp_default_version
139 syn keyword muttrcVarStr        contained pgp_default_version pgp_default_version pgp_gpg
140 syn keyword muttrcVarStr        contained pgp_key_version pgp_receive_version pgp_send_version
141 syn keyword muttrcVarStr        contained pgp_sign_as pgp_sign_micalg pgp_v2 pgp_v2_language
142 syn keyword muttrcVarStr        contained pgp_v2_pubring pgp_v2_secring pgp_v5 pgp_v5_language
143 syn keyword muttrcVarStr        contained pgp_v5_pubring pgp_v5_secring pipe_sep pop_host pop_pass
144 syn keyword muttrcVarStr        contained pop_user post_indent_str post_indent_string postponed
145 syn keyword muttrcVarStr        contained print_cmd print_command query_command quote_regexp
146 syn keyword muttrcVarStr        contained realname record reply_regexp sendmail shell signature
147 syn keyword muttrcVarStr        contained simple_search sort sort_alias sort_aux sort_browser
148 syn keyword muttrcVarStr        contained spoolfile status_chars status_format tmpdir to_chars
149 syn keyword muttrcVarStr        contained visual
151 syn keyword muttrcMenu          contained alias attach browser compose editor generic index pager
152 syn keyword muttrcMenu          contained pgp
154 syn keyword muttrcCommand       alternative_order auto_view fcc-hook fcc-save-hook folder-hook
155 syn keyword muttrcCommand       hdr_order ignore lists mailboxes mbox-hook my_hdr push reset
156 syn keyword muttrcCommand       save-hook score send-hook source toggle unalias uncolor unignore
157 syn keyword muttrcCommand       unlists unmy_hdr unscore unset
159 syn keyword muttrcSet           set     skipwhite nextgroup=muttrcVar.*
160 syn keyword muttrcUnset         unset   skipwhite nextgroup=muttrcVar.*
162 syn keyword muttrcBind          contained bind          skipwhite nextgroup=muttrcMenu
163 syn match   muttrcBindLine      "^\s*bind\s\+\S\+"      skipwhite nextgroup=muttrcKey\(Name\)\= contains=muttrcBind
165 syn keyword muttrcMacro         contained macro         skipwhite nextgroup=muttrcMenu
166 syn match   muttrcMacroLine     "^\s*macro\s\+\S\+"     skipwhite nextgroup=muttrcKey\(Name\)\= contains=muttrcMacro
168 syn keyword muttrcAlias         contained alias
169 syn match   muttrcAliasLine     "^\s*alias\s\+\S\+" contains=muttrcAlias
171 " Colour definitions takes object, foreground and background arguments (regexps excluded).
172 syn keyword muttrcColorField    contained attachment body bold error hdrdefault header index
173 syn keyword muttrcColorField    contained indicator markers message normal quoted search signature
174 syn keyword muttrcColorField    contained status tilde tree underline
175 syn match   muttrcColorField    contained "\<quoted\d\=\>"
176 syn keyword muttrcColorFG       contained black blue cyan default green magenta red white yellow
177 syn keyword muttrcColorFG       contained brightblue brightcyan brightdefault brightgreen
178 syn keyword muttrcColorFG       contained brightmagenta brightred brightwhite brightyellow
179 syn match   muttrcColorFG       contained "\<\(bright\)\=color\d\{1,2}\>"
180 syn keyword muttrcColorBG       contained black blue cyan default green magenta red white yellow
181 syn match   muttrcColorBG       contained "\<color\d\{1,2}\>"
182 " Now for the match
183 syn keyword muttrcColor         contained color                 skipwhite nextgroup=muttrcColorField
184 syn match   muttrcColorInit     contained "^\s*color\s\+\S\+"   skipwhite nextgroup=muttrcColorFG contains=muttrcColor
185 syn match   muttrcColorLine     "^\s*color\s\+\S\+\s\+\S"       skipwhite nextgroup=muttrcColorBG contains=muttrcColorInit
187 " Mono are almost like color (ojects inherited from color)
188 syn keyword muttrcMonoAttrib    contained bold none normal reverse standout underline
189 syn keyword muttrcMono          contained mono          skipwhite nextgroup=muttrcColorField
190 syn match   muttrcMonoLine      "^\s*mono\s\+\S\+"      skipwhite nextgroup=muttrcMonoAttrib contains=muttrcMono
192 " obsolete
193 syn keyword muttrcKeyName       contained backspace delete down end enter home insert left pagedown
194 syn keyword muttrcKeyName       contained pageup return right up
195 syn keyword muttrcVarBool       contained confirmfiles confirmfolders hold no_hdrs pgp_replypgp
196 syn keyword muttrcVarBool       contained point_new noconfirmfiles noconfirmfolders nohold nono_hdrs
197 syn keyword muttrcVarBool       contained nopgp_replypgp nopoint_new invconfirmfiles
198 syn keyword muttrcVarBool       contained invconfirmfolders invhold invno_hdrs invpgp_replypgp
199 syn keyword muttrcVarBool       contained invpoint_new attach_split edit_hdrs forw_decode forw_quote
200 syn keyword muttrcVarBool       contained mime_fwd
201 syn keyword muttrcVarNum        contained references
202 syn keyword muttrcVarQuad       contained verify_sig
203 syn keyword muttrcVarStr        contained local_sig local_site pgp pgp_pubring pgp_secring
204 syn keyword muttrcVarStr        contained pgp_version remote_sig thread_chars url_regexp web_browser
205 syn keyword muttrcVarStr        contained decode_format pgp_v3 pgp_v3_language pgp_v3_pubring
206 syn keyword muttrcVarStr        contained pgp_v3_secring sendmail_bounce
207 syn keyword muttrcMenu          contained url
208 syn keyword muttrcCommand       alternates localsite unlocalsite
210 " Define the default highlighting.
211 " For version 5.7 and earlier: only when not done already
212 " For version 5.8 and later: only when an item doesn't have highlighting yet
213 if version >= 508 || !exists("did_muttrc_syntax_inits")
214   if version < 508
215     let did_muttrc_syntax_inits = 1
216     command -nargs=+ HiLink hi link <args>
217   else
218     command -nargs=+ HiLink hi def link <args>
219   endif
221   HiLink muttrcComment          Comment
222   HiLink muttrcEscape           SpecialChar
223   HiLink muttrcString           String
224   HiLink muttrcSpecial          Special
225   HiLink muttrcNumber           Number
226   HiLink muttrcQuadopt          Boolean
227   HiLink muttrcEmail            Special
228   HiLink muttrcHeader           Type
229   HiLink muttrcKeySpecial       SpecialChar
230   HiLink muttrcKey              Type
231   HiLink muttrcKeyName          Macro
232   HiLink muttrcVarBool          Identifier
233   HiLink muttrcVarQuad          Identifier
234   HiLink muttrcVarNum           Identifier
235   HiLink muttrcVarStr           Identifier
236   HiLink muttrcMenu             Identifier
237   HiLink muttrcCommand          Keyword
238   HiLink muttrcSet              muttrcCommand
239   HiLink muttrcUnset            muttrcCommand
240   HiLink muttrcBind             muttrcCommand
241   HiLink muttrcMacro            muttrcCommand
242   HiLink muttrcAlias            muttrcCommand
243   HiLink muttrcAliasLine        Identifier
244   HiLink muttrcColorField       Identifier
245   HiLink muttrcColorFG          String
246   HiLink muttrcColorBG          muttrcColorFG
247   HiLink muttrcColor            muttrcCommand
248   HiLink muttrcMonoAttrib       muttrcColorFG
249   HiLink muttrcMono             muttrcCommand
251   delcommand HiLink
252 endif
254 let b:current_syntax = "muttrc"
256 "EOF    vim: ts=8 noet tw=100 sw=8 sts=0