blob: 89de1ff80d1c830e7839ee1a1b51f285c651d945 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim syntax file
Bram Moolenaar42eeac32005-06-29 22:40:58 +00002" Language: fetchmail(1) RC File
Bram Moolenaar57657d82006-04-21 22:12:41 +00003" Maintainer: Nikolai Weibull <now@bitwi.se>
4" Latest Revision: 2006-04-19
Bram Moolenaar071d4272004-06-13 20:20:40 +00005
Bram Moolenaar42eeac32005-06-29 22:40:58 +00006if exists("b:current_syntax")
Bram Moolenaar071d4272004-06-13 20:20:40 +00007 finish
8endif
9
Bram Moolenaar42eeac32005-06-29 22:40:58 +000010let s:cpo_save = &cpo
11set cpo&vim
Bram Moolenaar071d4272004-06-13 20:20:40 +000012
Bram Moolenaar42eeac32005-06-29 22:40:58 +000013syn keyword fetchmailTodo contained FIXME TODO XXX NOTE
Bram Moolenaar071d4272004-06-13 20:20:40 +000014
Bram Moolenaar42eeac32005-06-29 22:40:58 +000015syn region fetchmailComment start='#' end='$' contains=fetchmailTodo,@Spell
Bram Moolenaar071d4272004-06-13 20:20:40 +000016
Bram Moolenaar42eeac32005-06-29 22:40:58 +000017syn match fetchmailNumber display '\<\d\+\>'
Bram Moolenaar071d4272004-06-13 20:20:40 +000018
Bram Moolenaar42eeac32005-06-29 22:40:58 +000019syn region fetchmailString start=+"+ skip=+\\\\\|\\"+ end=+"+
20 \ contains=fetchmailStringEsc
21syn region fetchmailString start=+'+ skip=+\\\\\|\\'+ end=+'+
22 \ contains=fetchmailStringEsc
Bram Moolenaar071d4272004-06-13 20:20:40 +000023
Bram Moolenaar42eeac32005-06-29 22:40:58 +000024syn match fetchmailStringEsc contained '\\\([ntb]\|0\d*\|x\x\+\)'
Bram Moolenaar071d4272004-06-13 20:20:40 +000025
Bram Moolenaar42eeac32005-06-29 22:40:58 +000026syn region fetchmailKeyword transparent matchgroup=fetchmailKeyword
27 \ start='\<poll\|skip\|defaults\>'
28 \ end='\<poll\|skip\|defaults\>'
29 \ contains=ALLBUT,fetchmailOptions,fetchmailSet
Bram Moolenaar071d4272004-06-13 20:20:40 +000030
Bram Moolenaar42eeac32005-06-29 22:40:58 +000031syn keyword fetchmailServerOpts contained via proto[col] local[domains] port
32 \ auth[enticate] timeout envelope qvirtual aka
33 \ interface monitor plugin plugout dns
34 \ checkalias uidl interval netsec principal
35 \ esmtpname esmtppassword
Bram Moolenaar899dddf2006-03-26 21:06:50 +000036 \ sslcertck sslcertpath sslfingerprint
Bram Moolenaar42eeac32005-06-29 22:40:58 +000037syn match fetchmailServerOpts contained '\<no\_s\+\(envelope\|dns\|checkalias\|uidl\)'
Bram Moolenaar071d4272004-06-13 20:20:40 +000038
Bram Moolenaar42eeac32005-06-29 22:40:58 +000039syn keyword fetchmailUserOpts contained user[name] is to pass[word] ssl
40 \ sslcert sslkey sslproto folder smtphost
41 \ fetchdomains smtpaddress smtpname antispam
42 \ mda bsmtp preconnect postconnect keep flush
43 \ fetchall rewrite stripcr forcecr pass8bits
44 \ dropstatus dropdelivered mimedecode idle
45 \ limit warnings batchlimit fetchlimit expunge
46 \ tracepolls properties
47syn match fetchmailUserOpts contained '\<no\_s\+\(keep\|flush\|fetchall\|rewrite\|stripcr\|forcecr\|pass8bits\|dropstatus\|dropdelivered\|mimedecode\|noidle\)'
Bram Moolenaar071d4272004-06-13 20:20:40 +000048
Bram Moolenaar42eeac32005-06-29 22:40:58 +000049syn keyword fetchmailSpecial contained here there
Bram Moolenaar071d4272004-06-13 20:20:40 +000050
Bram Moolenaar42eeac32005-06-29 22:40:58 +000051syn keyword fetchmailNoise and with has wants options
52syn match fetchmailNoise display '[:;,]'
Bram Moolenaar071d4272004-06-13 20:20:40 +000053
Bram Moolenaar42eeac32005-06-29 22:40:58 +000054syn keyword fetchmailSet nextgroup=fetchmailOptions skipwhite skipnl set
Bram Moolenaar071d4272004-06-13 20:20:40 +000055
Bram Moolenaar42eeac32005-06-29 22:40:58 +000056syn keyword fetchmailOptions daemon postmaster bouncemail spambounce logfile
57 \ idfile syslog nosyslog properties
58syn match fetchmailOptions '\<no\_s\+\(bouncemail\|spambounce\)'
Bram Moolenaar071d4272004-06-13 20:20:40 +000059
Bram Moolenaar42eeac32005-06-29 22:40:58 +000060hi def link fetchmailComment Comment
61hi def link fetchmailTodo Todo
62hi def link fetchmailNumber Number
63hi def link fetchmailString String
64hi def link fetchmailStringEsc SpecialChar
65hi def link fetchmailKeyword Keyword
66hi def link fetchmailServerOpts Identifier
67hi def link fetchmailUserOpts Identifier
68hi def link fetchmailSpecial Special
69hi def link fetchmailSet Keyword
70hi def link fetchmailOptions Identifier
Bram Moolenaar071d4272004-06-13 20:20:40 +000071
72let b:current_syntax = "fetchmail"
73
Bram Moolenaar42eeac32005-06-29 22:40:58 +000074let &cpo = s:cpo_save
75unlet s:cpo_save