annotate runtime/syntax/bdf.vim @ 34:7f788cd27415 v7.0020

updated for version 7.0020
author vimboss
date Sun, 24 Oct 2004 19:23:07 +0000
parents 3fc0f57ecb91
children f14cbd913415
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: BDF Font definition
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Nikolai Weibull <source@pcppopper.org>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " URL: http://www.pcppopper.org/vim/syntax/pcp/bdf/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " Latest Revision: 2004-05-06
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " arch-tag: b696b6ba-af24-41ba-b4eb-d248495eca68
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 " numbers
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 syn match bdfNumber display "\<\(\x\+\|\d\+\.\d\+\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 " comments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 syn region bdfComment start="^COMMENT\>" end="$" contains=bdfTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 " todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn keyword bdfTodo contained TODO FIXME XXX NOTE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 " strings
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn region bdfString start=+"+ skip=+""+ end=+"+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 " properties
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn keyword bdfProperties contained FONT SIZE FONTBOUNDINGBOX CHARS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 " X11 properties
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn keyword bdfXProperties contained FONT_ASCENT FONT_DESCENT DEFAULT_CHAR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn keyword bdfXProperties contained FONTNAME_REGISTRY FOUNDRY FAMILY_NAME
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn keyword bdfXProperties contained WEIGHT_NAME SLANT SETWIDTH_NAME PIXEL_SIZE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn keyword bdfXProperties contained POINT_SIZE RESOLUTION_X RESOLUTION_Y SPACING
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn keyword bdfXProperties contained CHARSET_REGISTRY CHARSET_ENCODING COPYRIGHT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn keyword bdfXProperties contained ADD_STYLE_NAME WEIGHT RESOLUTION X_HEIGHT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn keyword bdfXProperties contained QUAD_WIDTH FONT AVERAGE_WIDTH
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn region bdfDefinition transparent matchgroup=bdfDelim start="^STARTPROPERTIES\>" end="^ENDPROPERTIES\>" contains=bdfXProperties,bdfNumber,bdfString
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 " characters
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn keyword bdfCharProperties contained ENCODING SWIDTH DWIDTH BBX ATTRIBUTES BITMAP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn match bdfCharName contained display "\<[0-9a-zA-Z]\{1,14}\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn match bdfCharNameError contained display "\<[0-9a-zA-Z]\{15,}\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn region bdfStartChar transparent matchgroup=bdfDelim start="\<STARTCHAR\>" end="$" contains=bdfCharName,bdfCharNameError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn region bdfCharDefinition transparent start="^STARTCHAR\>" matchgroup=bdfDelim end="^ENDCHAR\>" contains=bdfCharProperties,bdfNumber,bdfStartChar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 " font
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn region bdfFontDefinition transparent matchgroup=bdfDelim start="^STARTFONT\>" end="^ENDFONT\>" contains=bdfProperties,bdfDefinition,bdfCharDefinition,bdfNumber,bdfComment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 if exists("bdf_minlines")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 let b:bdf_minlines = bdf_minlines
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 let b:bdf_minlines = 50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 exec "syn sync minlines=" . b:bdf_minlines
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 if version >= 508 || !exists("did_bdf_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 let did_bdf_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 HiLink bdfComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 HiLink bdfTodo Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 HiLink bdfNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 HiLink bdfString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 HiLink bdfProperties Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 HiLink bdfXProperties Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 HiLink bdfCharProperties Structure
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 HiLink bdfDelim Delimiter
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 HiLink bdfCharName String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 HiLink bdfCharNameError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 let b:current_syntax = "bdf"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 " vim: set sts=2 sw=2: