Merge branch 'hack/autopaste'
[vim-kana.git] / runtime / syntax / bdf.vim
blobd0c73eb601f67b6d1a4a83489511d41cb9328ce1
1 " Vim syntax file
2 " Language:         BDF font definition
3 " Maintainer:       Nikolai Weibull <now@bitwi.se>
4 " Latest Revision:  2006-04-19
6 if exists("b:current_syntax")
7   finish
8 endif
10 let s:cpo_save = &cpo
11 set cpo&vim
13 syn region  bdfFontDefinition transparent matchgroup=bdfKeyword
14                               \ start='^STARTFONT\>' end='^ENDFONT\>'
15                               \ contains=bdfComment,bdfFont,bdfSize,
16                               \ bdfBoundingBox,bdfProperties,bdfChars,bdfChar
18 syn match   bdfNumber         contained display
19                               \ '\<\%(\x\+\|[+-]\=\d\+\%(\.\d\+\)*\)'
21 syn keyword bdfTodo           contained FIXME TODO XXX NOTE
23 syn region  bdfComment        contained start='^COMMENT\>' end='$'
24                               \ contains=bdfTodo,@Spell
26 syn region  bdfFont           contained matchgroup=bdfKeyword
27                               \ start='^FONT\>' end='$'
29 syn region  bdfSize           contained transparent matchgroup=bdfKeyword
30                               \ start='^SIZE\>' end='$' contains=bdfNumber
32 syn region  bdfBoundingBox    contained transparent matchgroup=bdfKeyword
33                               \ start='^FONTBOUNDINGBOX' end='$'
34                               \ contains=bdfNumber
36 syn region  bdfProperties     contained transparent matchgroup=bdfKeyword
37                               \ start='^STARTPROPERTIES' end='^ENDPROPERTIES'
38                               \ contains=bdfNumber,bdfString,bdfProperty,
39                               \ bdfXProperty
41 syn keyword bdfProperty       contained FONT_ASCENT FONT_DESCENT DEFAULT_CHAR
42 syn match   bdfProperty       contained '^\S\+'
44 syn keyword bdfXProperty      contained FONT_ASCENT FONT_DESCENT DEFAULT_CHAR
45                               \ FONTNAME_REGISTRY FOUNDRY FAMILY_NAME
46                               \ WEIGHT_NAME SLANT SETWIDTH_NAME PIXEL_SIZE
47                               \ POINT_SIZE RESOLUTION_X RESOLUTION_Y SPACING
48                               \ CHARSET_REGISTRY CHARSET_ENCODING COPYRIGHT
49                               \ ADD_STYLE_NAME WEIGHT RESOLUTION X_HEIGHT
50                               \ QUAD_WIDTH FONT AVERAGE_WIDTH
52 syn region  bdfString         contained start=+"+ skip=+""+ end=+"+
54 syn region  bdfChars          contained display transparent
55                               \ matchgroup=bdfKeyword start='^CHARS' end='$'
56                               \ contains=bdfNumber
58 syn region  bdfChar           transparent matchgroup=bdfKeyword
59                               \ start='^STARTCHAR' end='^ENDCHAR'
60                               \ contains=bdfEncoding,bdfWidth,bdfAttributes,
61                               \ bdfBitmap
63 syn region  bdfEncoding       contained transparent matchgroup=bdfKeyword
64                               \ start='^ENCODING' end='$' contains=bdfNumber
66 syn region  bdfWidth          contained transparent matchgroup=bdfKeyword
67                               \ start='^SWIDTH\|DWIDTH\|BBX' end='$'
68                               \ contains=bdfNumber
70 syn region  bdfAttributes     contained transparent matchgroup=bdfKeyword
71                               \ start='^ATTRIBUTES' end='$'
73 syn keyword bdfBitmap         contained BITMAP
75 if exists("bdf_minlines")
76   let b:bdf_minlines = bdf_minlines
77 else
78   let b:bdf_minlines = 30
79 endif
80 exec "syn sync ccomment bdfChar minlines=" . b:bdf_minlines
83 hi def link bdfKeyword        Keyword
84 hi def link bdfNumber         Number
85 hi def link bdfTodo           Todo
86 hi def link bdfComment        Comment
87 hi def link bdfFont           String
88 hi def link bdfProperty       Identifier
89 hi def link bdfXProperty      Identifier
90 hi def link bdfString         String
91 hi def link bdfChars          Keyword
92 hi def link bdfBitmap         Keyword
94 let b:current_syntax = "bdf"
96 let &cpo = s:cpo_save
97 unlet s:cpo_save