Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1 | " Vim syntax file |
| 2 | " Language: SGML (SGML Declaration <!SGML ...>) |
| 3 | " Last Change: jueves, 28 de diciembre de 2000, 13:51:44 CLST |
| 4 | " Maintainer: "Daniel A. Molina W." <sickd@linux-chile.org> |
| 5 | " You can modify and maintain this file, in other case send comments |
| 6 | " the maintainer email address. |
| 7 | |
| 8 | " For version 5.x: Clear all syntax items |
| 9 | " For version 6.x: Quit when a syntax file was already loaded |
| 10 | if version < 600 |
| 11 | syntax clear |
| 12 | elseif exists("b:current_syntax") |
| 13 | finish |
| 14 | endif |
Bram Moolenaar | 9a7224b | 2012-04-30 15:56:52 +0200 | [diff] [blame] | 15 | let s:keepcpo= &cpo |
| 16 | set cpo&vim |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 17 | |
| 18 | syn case ignore |
| 19 | |
| 20 | syn region sgmldeclDeclBlock transparent start=+<!SGML+ end=+>+ |
| 21 | syn region sgmldeclTagBlock transparent start=+<+ end=+>+ |
| 22 | \ contains=ALLBUT, |
| 23 | \ @sgmlTagError,@sgmlErrInTag |
| 24 | syn region sgmldeclComment contained start=+--+ end=+--+ |
| 25 | |
| 26 | syn keyword sgmldeclDeclKeys SGML CHARSET CAPACITY SCOPE SYNTAX |
| 27 | \ FEATURES |
| 28 | |
| 29 | syn keyword sgmldeclTypes BASESET DESCSET DOCUMENT NAMING DELIM |
| 30 | \ NAMES QUANTITY SHUNCHAR DOCTYPE |
| 31 | \ ELEMENT ENTITY ATTLIST NOTATION |
| 32 | \ TYPE |
| 33 | |
| 34 | syn keyword sgmldeclStatem CONTROLS FUNCTION NAMECASE MINIMIZE |
| 35 | \ LINK OTHER APPINFO REF ENTITIES |
| 36 | |
| 37 | syn keyword sgmldeclVariables TOTALCAP GRPCAP ENTCAP DATATAG OMITTAG RANK |
| 38 | \ SIMPLE IMPLICIT EXPLICIT CONCUR SUBDOC FORMAL ATTCAP |
| 39 | \ ATTCHCAP AVGRPCAP ELEMCAP ENTCHCAP IDCAP IDREFCAP |
| 40 | \ SHORTTAG |
| 41 | |
| 42 | syn match sgmldeclNConst contained +[0-9]\++ |
| 43 | |
| 44 | syn region sgmldeclString contained start=+"+ end=+"+ |
| 45 | |
| 46 | syn keyword sgmldeclBool YES NO |
| 47 | |
| 48 | syn keyword sgmldeclSpecial SHORTREF SGMLREF UNUSED NONE GENERAL |
| 49 | \ SEEALSO ANY |
| 50 | |
| 51 | syn sync lines=250 |
| 52 | |
| 53 | |
| 54 | " Define the default highlighting. |
| 55 | " For version 5.7 and earlier: only when not done already |
| 56 | " For version 5.8 and later: only when an item doesn't have highlighting yet |
| 57 | if version >= 508 || !exists("did_sgmldecl_syntax_init") |
| 58 | if version < 508 |
| 59 | let did_sgmldecl_syntax_init = 1 |
| 60 | command -nargs=+ HiLink hi link <args> |
| 61 | else |
| 62 | command -nargs=+ HiLink hi def link <args> |
| 63 | endif |
| 64 | |
| 65 | HiLink sgmldeclDeclKeys Keyword |
| 66 | HiLink sgmldeclTypes Type |
| 67 | HiLink sgmldeclConst Constant |
| 68 | HiLink sgmldeclNConst Constant |
| 69 | HiLink sgmldeclString String |
| 70 | HiLink sgmldeclDeclBlock Normal |
| 71 | HiLink sgmldeclBool Boolean |
| 72 | HiLink sgmldeclSpecial Special |
| 73 | HiLink sgmldeclComment Comment |
| 74 | HiLink sgmldeclStatem Statement |
| 75 | HiLink sgmldeclVariables Type |
| 76 | |
| 77 | delcommand HiLink |
| 78 | endif |
| 79 | |
| 80 | let b:current_syntax = "sgmldecl" |
Bram Moolenaar | 9a7224b | 2012-04-30 15:56:52 +0200 | [diff] [blame] | 81 | |
| 82 | let &cpo = s:keepcpo |
| 83 | unlet s:keepcpo |
| 84 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 85 | " vim:set tw=78 ts=4: |