1
0
Fork 0
mirror of https://github.com/vim/vim synced 2025-03-29 04:56:43 +01:00
vim/runtime/syntax/bdf.vim

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

98 lines
3.8 KiB
VimL
Raw Permalink Normal View History

2004-06-13 20:20:40 +00:00
" Vim syntax file
2017-03-05 17:04:09 +01:00
" Language: BDF font definition
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2006-04-19
2005-06-29 22:40:58 +00:00
if exists("b:current_syntax")
2004-06-13 20:20:40 +00:00
finish
endif
2005-06-29 22:40:58 +00:00
let s:cpo_save = &cpo
set cpo&vim
syn region bdfFontDefinition transparent matchgroup=bdfKeyword
\ start='^STARTFONT\>' end='^ENDFONT\>'
\ contains=bdfComment,bdfFont,bdfSize,
\ bdfBoundingBox,bdfProperties,bdfChars,bdfChar
syn match bdfNumber contained display
\ '\<\%(\x\+\|[+-]\=\d\+\%(\.\d\+\)*\)'
syn keyword bdfTodo contained FIXME TODO XXX NOTE
syn region bdfComment contained start='^COMMENT\>' end='$'
\ contains=bdfTodo,@Spell
2004-06-13 20:20:40 +00:00
2005-06-29 22:40:58 +00:00
syn region bdfFont contained matchgroup=bdfKeyword
\ start='^FONT\>' end='$'
2004-06-13 20:20:40 +00:00
2005-06-29 22:40:58 +00:00
syn region bdfSize contained transparent matchgroup=bdfKeyword
\ start='^SIZE\>' end='$' contains=bdfNumber
2004-06-13 20:20:40 +00:00
2005-06-29 22:40:58 +00:00
syn region bdfBoundingBox contained transparent matchgroup=bdfKeyword
\ start='^FONTBOUNDINGBOX' end='$'
\ contains=bdfNumber
2004-06-13 20:20:40 +00:00
2005-06-29 22:40:58 +00:00
syn region bdfProperties contained transparent matchgroup=bdfKeyword
\ start='^STARTPROPERTIES' end='^ENDPROPERTIES'
\ contains=bdfNumber,bdfString,bdfProperty,
\ bdfXProperty
2004-06-13 20:20:40 +00:00
2005-06-29 22:40:58 +00:00
syn keyword bdfProperty contained FONT_ASCENT FONT_DESCENT DEFAULT_CHAR
syn match bdfProperty contained '^\S\+'
2004-06-13 20:20:40 +00:00
2005-06-29 22:40:58 +00:00
syn keyword bdfXProperty contained FONT_ASCENT FONT_DESCENT DEFAULT_CHAR
\ FONTNAME_REGISTRY FOUNDRY FAMILY_NAME
\ WEIGHT_NAME SLANT SETWIDTH_NAME PIXEL_SIZE
\ POINT_SIZE RESOLUTION_X RESOLUTION_Y SPACING
\ CHARSET_REGISTRY CHARSET_ENCODING COPYRIGHT
\ ADD_STYLE_NAME WEIGHT RESOLUTION X_HEIGHT
\ QUAD_WIDTH FONT AVERAGE_WIDTH
2004-06-13 20:20:40 +00:00
2005-06-29 22:40:58 +00:00
syn region bdfString contained start=+"+ skip=+""+ end=+"+
2004-06-13 20:20:40 +00:00
2005-06-29 22:40:58 +00:00
syn region bdfChars contained display transparent
\ matchgroup=bdfKeyword start='^CHARS' end='$'
\ contains=bdfNumber
2004-06-13 20:20:40 +00:00
2005-06-29 22:40:58 +00:00
syn region bdfChar transparent matchgroup=bdfKeyword
\ start='^STARTCHAR' end='^ENDCHAR'
\ contains=bdfEncoding,bdfWidth,bdfAttributes,
\ bdfBitmap
2004-06-13 20:20:40 +00:00
2005-06-29 22:40:58 +00:00
syn region bdfEncoding contained transparent matchgroup=bdfKeyword
\ start='^ENCODING' end='$' contains=bdfNumber
2004-06-13 20:20:40 +00:00
2005-06-29 22:40:58 +00:00
syn region bdfWidth contained transparent matchgroup=bdfKeyword
\ start='^SWIDTH\|DWIDTH\|BBX' end='$'
\ contains=bdfNumber
syn region bdfAttributes contained transparent matchgroup=bdfKeyword
\ start='^ATTRIBUTES' end='$'
syn keyword bdfBitmap contained BITMAP
2004-06-13 20:20:40 +00:00
if exists("bdf_minlines")
let b:bdf_minlines = bdf_minlines
else
2005-06-29 22:40:58 +00:00
let b:bdf_minlines = 30
2004-06-13 20:20:40 +00:00
endif
2005-06-29 22:40:58 +00:00
exec "syn sync ccomment bdfChar minlines=" . b:bdf_minlines
hi def link bdfKeyword Keyword
hi def link bdfNumber Number
hi def link bdfTodo Todo
hi def link bdfComment Comment
hi def link bdfFont String
hi def link bdfProperty Identifier
hi def link bdfXProperty Identifier
hi def link bdfString String
hi def link bdfChars Keyword
hi def link bdfBitmap Keyword
2004-06-13 20:20:40 +00:00
let b:current_syntax = "bdf"
2005-06-29 22:40:58 +00:00
let &cpo = s:cpo_save
unlet s:cpo_save