Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1 | " Vim syntax file |
| 2 | " Language: fetchmail(1) RC File |
| 3 | " Maintainer: Nikolai Weibull <source@pcppopper.org> |
| 4 | " URL: http://www.pcppopper.org/vim/syntax/pcp/fetchmail/ |
| 5 | " Latest Revision: 2004-05-06 |
| 6 | " arch-tag: 59d8adac-6e59-45f6-88cb-f9ba1e009c1f |
| 7 | |
| 8 | if version < 600 |
| 9 | syntax clear |
| 10 | elseif exists("b:current_syntax") |
| 11 | finish |
| 12 | endif |
| 13 | |
| 14 | " todo |
| 15 | syn keyword fetchmailTodo contained FIXME TODO XXX NOTE |
| 16 | |
| 17 | " comments |
| 18 | syn region fetchmailComment start="#" end="$" contains=fetchmailTodo |
| 19 | |
| 20 | " numbers |
| 21 | syn match fetchmailNumber "\<\d\+\>" |
| 22 | |
| 23 | " strings |
| 24 | syn region fetchmailString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=fetchmailStringEsc |
| 25 | syn region fetchmailString start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=fetchmailStringEsc |
| 26 | |
| 27 | " escape characters in strings |
| 28 | syn match fetchmailStringEsc "\\\([ntb]\|0\d*\|x\x\+\)" |
| 29 | |
| 30 | " server entries |
| 31 | syn region fetchmailKeyword transparent matchgroup=fetchmailKeyword start="\<poll\|skip\|defaults\>" end="\<poll\|skip\|defaults\>" contains=ALLBUT,fetchmailOptions,fetchmailSet |
| 32 | |
| 33 | " server options |
| 34 | syn keyword fetchmailServerOpts contained via proto[col] local[domains] port auth[enticate] |
| 35 | syn keyword fetchmailServerOpts contained timeout envelope qvirtual aka interface monitor |
| 36 | syn keyword fetchmailServerOpts contained plugin plugout dns checkalias uidl interval netsec |
| 37 | syn keyword fetchmailServerOpts contained principal esmtpname esmtppassword |
| 38 | syn match fetchmailServerOpts contained "\<no\_s\+\(envelope\|dns\|checkalias\|uidl\)" |
| 39 | |
| 40 | " user options |
| 41 | syn keyword fetchmailUserOpts contained user[name] is to pass[word] ssl sslcert sslkey sslproto folder |
| 42 | syn keyword fetchmailUserOpts contained smtphost fetchdomains smtpaddress smtpname antispam mda bsmtp |
| 43 | syn keyword fetchmailUserOpts contained preconnect postconnect keep flush fetchall rewrite stripcr |
| 44 | syn keyword fetchmailUserOpts contained forcecr pass8bits dropstatus dropdelivered mimedecode idle |
| 45 | syn keyword fetchmailUserOpts contained limit warnings batchlimit fetchlimit expunge tracepolls properties |
| 46 | syn match fetchmailUserOpts contained "\<no\_s\+\(keep\|flush\|fetchall\|rewrite\|stripcr\|forcecr\|pass8bits\|dropstatus\|dropdelivered\|mimedecode\|noidle\)" |
| 47 | |
| 48 | syn keyword fetchmailSpecial contained here there |
| 49 | |
| 50 | |
| 51 | " noise keywords |
| 52 | syn keyword fetchmailNoise and with has wants options |
| 53 | syn match fetchmailNoise "[:;,]" |
| 54 | |
| 55 | " options |
| 56 | syn keyword fetchmailSet nextgroup=fetchmailOptions skipwhite skipnl set |
| 57 | |
| 58 | syn keyword fetchmailOptions daemon postmaster bouncemail spambounce logfile idfile syslog nosyslog properties |
| 59 | syn match fetchmailOptions "\<no\_s\+\(bouncemail\|spambounce\)" |
| 60 | |
| 61 | " Define the default highlighting. |
| 62 | " For version 5.7 and earlier: only when not done already |
| 63 | " For version 5.8 and later: only when an item doesn't have highlighting yet |
| 64 | if version >= 508 || !exists("did_fetchmail_syn_inits") |
| 65 | if version < 508 |
| 66 | let did_fetchmail_syn_inits = 1 |
| 67 | command -nargs=+ HiLink hi link <args> |
| 68 | else |
| 69 | command -nargs=+ HiLink hi def link <args> |
| 70 | endif |
| 71 | |
| 72 | HiLink fetchmailComment Comment |
| 73 | HiLink fetchmailTodo Todo |
| 74 | HiLink fetchmailNumber Number |
| 75 | HiLink fetchmailString String |
| 76 | HiLink fetchmailStringEsc SpecialChar |
| 77 | HiLink fetchmailKeyword Keyword |
| 78 | HiLink fetchmailServerOpts Identifier |
| 79 | HiLink fetchmailUserOpts Identifier |
| 80 | HiLink fetchmailSpecial Special |
| 81 | HiLink fetchmailSet Keyword |
| 82 | HiLink fetchmailOptions Identifier |
| 83 | delcommand HiLink |
| 84 | endif |
| 85 | |
| 86 | let b:current_syntax = "fetchmail" |
| 87 | |
| 88 | " vim: set sts=2 sw=2: |