annotate runtime/syntax/bdf.vim @ 6978:5ad1ff809c32

Added tag v7-4-806 for changeset b10995a2f7c3
author Bram Moolenaar <bram@vim.org>
date Tue, 04 Aug 2015 18:23:22 +0200
parents 1f3b1021f002
children 1218c5353e2b
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
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
2 " Language: BDF font definition
839
1f3b1021f002 updated for version 7.0e05
vimboss
parents: 375
diff changeset
3 " Maintainer: Nikolai Weibull <now@bitwi.se>
1f3b1021f002 updated for version 7.0e05
vimboss
parents: 375
diff changeset
4 " Latest Revision: 2006-04-19
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
6 if exists("b:current_syntax")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
10 let s:cpo_save = &cpo
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
11 set cpo&vim
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
13 syn region bdfFontDefinition transparent matchgroup=bdfKeyword
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
14 \ start='^STARTFONT\>' end='^ENDFONT\>'
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
15 \ contains=bdfComment,bdfFont,bdfSize,
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
16 \ bdfBoundingBox,bdfProperties,bdfChars,bdfChar
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
17
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
18 syn match bdfNumber contained display
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
19 \ '\<\%(\x\+\|[+-]\=\d\+\%(\.\d\+\)*\)'
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
20
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
21 syn keyword bdfTodo contained FIXME TODO XXX NOTE
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
23 syn region bdfComment contained start='^COMMENT\>' end='$'
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
24 \ contains=bdfTodo,@Spell
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
25
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
26 syn region bdfFont contained matchgroup=bdfKeyword
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
27 \ start='^FONT\>' end='$'
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
28
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
29 syn region bdfSize contained transparent matchgroup=bdfKeyword
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
30 \ start='^SIZE\>' end='$' contains=bdfNumber
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
32 syn region bdfBoundingBox contained transparent matchgroup=bdfKeyword
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
33 \ start='^FONTBOUNDINGBOX' end='$'
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
34 \ contains=bdfNumber
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
36 syn region bdfProperties contained transparent matchgroup=bdfKeyword
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
37 \ start='^STARTPROPERTIES' end='^ENDPROPERTIES'
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
38 \ contains=bdfNumber,bdfString,bdfProperty,
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
39 \ bdfXProperty
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
41 syn keyword bdfProperty contained FONT_ASCENT FONT_DESCENT DEFAULT_CHAR
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
42 syn match bdfProperty contained '^\S\+'
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
44 syn keyword bdfXProperty contained FONT_ASCENT FONT_DESCENT DEFAULT_CHAR
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
45 \ FONTNAME_REGISTRY FOUNDRY FAMILY_NAME
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
46 \ WEIGHT_NAME SLANT SETWIDTH_NAME PIXEL_SIZE
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
47 \ POINT_SIZE RESOLUTION_X RESOLUTION_Y SPACING
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
48 \ CHARSET_REGISTRY CHARSET_ENCODING COPYRIGHT
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
49 \ ADD_STYLE_NAME WEIGHT RESOLUTION X_HEIGHT
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
50 \ QUAD_WIDTH FONT AVERAGE_WIDTH
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
51
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
52 syn region bdfString contained start=+"+ skip=+""+ end=+"+
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
53
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
54 syn region bdfChars contained display transparent
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
55 \ matchgroup=bdfKeyword start='^CHARS' end='$'
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
56 \ contains=bdfNumber
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
58 syn region bdfChar transparent matchgroup=bdfKeyword
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
59 \ start='^STARTCHAR' end='^ENDCHAR'
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
60 \ contains=bdfEncoding,bdfWidth,bdfAttributes,
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
61 \ bdfBitmap
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
63 syn region bdfEncoding contained transparent matchgroup=bdfKeyword
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
64 \ start='^ENCODING' end='$' contains=bdfNumber
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
66 syn region bdfWidth contained transparent matchgroup=bdfKeyword
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
67 \ start='^SWIDTH\|DWIDTH\|BBX' end='$'
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
68 \ contains=bdfNumber
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
70 syn region bdfAttributes contained transparent matchgroup=bdfKeyword
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
71 \ start='^ATTRIBUTES' end='$'
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
73 syn keyword bdfBitmap contained BITMAP
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 if exists("bdf_minlines")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 let b:bdf_minlines = bdf_minlines
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 else
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
78 let b:bdf_minlines = 30
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 endif
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
80 exec "syn sync ccomment bdfChar minlines=" . b:bdf_minlines
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
81
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
83 hi def link bdfKeyword Keyword
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
84 hi def link bdfNumber Number
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
85 hi def link bdfTodo Todo
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
86 hi def link bdfComment Comment
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
87 hi def link bdfFont String
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
88 hi def link bdfProperty Identifier
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
89 hi def link bdfXProperty Identifier
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
90 hi def link bdfString String
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
91 hi def link bdfChars Keyword
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
92 hi def link bdfBitmap Keyword
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 let b:current_syntax = "bdf"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
96 let &cpo = s:cpo_save
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
97 unlet s:cpo_save