Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1 | " Vim syntax file |
| 2 | " Language: ecd (Embedix Component Description) files |
| 3 | " Maintainer: John Beppu <beppu@opensource.lineo.com> |
| 4 | " URL: http://opensource.lineo.com/~beppu/prose/ecd_vim.html |
| 5 | " Last Change: 2001 Sep 27 |
| 6 | |
| 7 | " An ECD file contains meta-data for packages in the Embedix Linux distro. |
| 8 | " This syntax file was derived from apachestyle.vim |
| 9 | " by Christian Hammers <ch@westend.com> |
| 10 | |
Bram Moolenaar | 89bcfda | 2016-08-30 23:26:57 +0200 | [diff] [blame] | 11 | " quit when a syntax file was already loaded |
| 12 | if exists("b:current_syntax") |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 13 | finish |
| 14 | endif |
| 15 | |
| 16 | syn case ignore |
| 17 | |
| 18 | " specials |
| 19 | syn match ecdComment "^\s*#.*" |
| 20 | |
| 21 | " options and values |
| 22 | syn match ecdAttr "^\s*[a-zA-Z]\S*\s*[=].*$" contains=ecdAttrN,ecdAttrV |
| 23 | syn match ecdAttrN contained "^.*="me=e-1 |
| 24 | syn match ecdAttrV contained "=.*$"ms=s+1 |
| 25 | |
| 26 | " tags |
| 27 | syn region ecdTag start=+<+ end=+>+ contains=ecdTagN,ecdTagError |
| 28 | syn match ecdTagN contained +<[/\s]*[-a-zA-Z0-9_]\++ms=s+1 |
| 29 | syn match ecdTagError contained "[^>]<"ms=s+1 |
| 30 | |
| 31 | " Define the default highlighting. |
Bram Moolenaar | 89bcfda | 2016-08-30 23:26:57 +0200 | [diff] [blame] | 32 | " Only when an item doesn't have highlighting yet |
| 33 | command -nargs=+ HiLink hi def link <args> |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 34 | |
Bram Moolenaar | 89bcfda | 2016-08-30 23:26:57 +0200 | [diff] [blame] | 35 | HiLink ecdComment Comment |
| 36 | HiLink ecdAttr Type |
| 37 | HiLink ecdAttrN Statement |
| 38 | HiLink ecdAttrV Value |
| 39 | HiLink ecdTag Function |
| 40 | HiLink ecdTagN Statement |
| 41 | HiLink ecdTagError Error |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 42 | |
Bram Moolenaar | 89bcfda | 2016-08-30 23:26:57 +0200 | [diff] [blame] | 43 | delcommand HiLink |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 44 | |
| 45 | let b:current_syntax = "ecd" |
| 46 | " vim: ts=8 |