Mercurial > vim
annotate runtime/syntax/sgmldecl.vim @ 7467:765110dd332c v7.4.1036
commit https://github.com/vim/vim/commit/fa03fd6c4a9fe05274d62ddefd645cb5801d2023
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 2 22:03:00 2016 +0100
patch 7.4.1036
Problem: Only terminals with up to 256 colors work properly.
Solution: Use the 256 color behavior for all terminals with 256 or more
colors. (Robert de Bath, closes https://github.com/vim/vim/issues/504)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 02 Jan 2016 22:15:04 +0100 |
parents | d1e4abe8342c |
children | 43efa4f5a8ea |
rev | line source |
---|---|
7 | 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 | |
3496
d1e4abe8342c
Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents:
7
diff
changeset
|
15 let s:keepcpo= &cpo |
d1e4abe8342c
Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents:
7
diff
changeset
|
16 set cpo&vim |
7 | 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" | |
3496
d1e4abe8342c
Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents:
7
diff
changeset
|
81 |
d1e4abe8342c
Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents:
7
diff
changeset
|
82 let &cpo = s:keepcpo |
d1e4abe8342c
Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents:
7
diff
changeset
|
83 unlet s:keepcpo |
d1e4abe8342c
Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents:
7
diff
changeset
|
84 |
7 | 85 " vim:set tw=78 ts=4: |