7
|
1 " Vim syntax file
|
|
2 " This is a GENERATED FILE. Please always refer to source file at the URI below.
|
|
3 " Language: XKB (X Keyboard Extension) components
|
|
4 " Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>
|
|
5 " Last Change: 2003-04-13
|
|
6 " URL: http://trific.ath.cx/Ftp/vim/syntax/xkb.vim
|
|
7
|
|
8 " Setup
|
|
9 if version >= 600
|
|
10 if exists("b:current_syntax")
|
|
11 finish
|
|
12 endif
|
|
13 else
|
|
14 syntax clear
|
|
15 endif
|
|
16
|
|
17 syn case match
|
|
18 syn sync minlines=100
|
|
19
|
|
20 " Comments
|
|
21 syn region xkbComment start="//" skip="\\$" end="$" keepend contains=xkbTodo
|
|
22 syn region xkbComment start="/\*" matchgroup=NONE end="\*/" contains=xkbCommentStartError,xkbTodo
|
|
23 syn match xkbCommentError "\*/"
|
|
24 syntax match xkbCommentStartError "/\*" contained
|
|
25 syn sync ccomment xkbComment
|
|
26 syn keyword xkbTodo TODO FIXME contained
|
|
27
|
|
28 " Literal strings
|
|
29 syn match xkbSpecialChar "\\\d\d\d\|\\." contained
|
|
30 syn region xkbString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=xkbSpecialChar oneline
|
|
31
|
|
32 " Catch errors caused by wrong parenthesization
|
|
33 syn region xkbParen start='(' end=')' contains=ALLBUT,xkbParenError,xkbSpecial,xkbTodo transparent
|
|
34 syn match xkbParenError ")"
|
|
35 syn region xkbBrace start='{' end='}' contains=ALLBUT,xkbBraceError,xkbSpecial,xkbTodo transparent
|
|
36 syn match xkbBraceError "}"
|
|
37 syn region xkbBracket start='\[' end='\]' contains=ALLBUT,xkbBracketError,xkbSpecial,xkbTodo transparent
|
|
38 syn match xkbBracketError "\]"
|
|
39
|
|
40 " Physical keys
|
|
41 syn match xkbPhysicalKey "<\w\+>"
|
|
42
|
|
43 " Keywords
|
|
44 syn keyword xkbPreproc augment include replace
|
|
45 syn keyword xkbConstant False True
|
|
46 syn keyword xkbModif override replace
|
|
47 syn keyword xkbIdentifier action affect alias allowExplicit approx baseColor button clearLocks color controls cornerRadius count ctrls description driveskbd font fontSize gap group groups height indicator indicatorDrivesKeyboard interpret key keys labelColor latchToLock latchMods left level_name map maximum minimum modifier_map modifiers name offColor onColor outline preserve priority repeat row section section setMods shape slant solid symbols text top type useModMapMods virtualModifier virtualMods virtual_modifiers weight whichModState width
|
|
48 syn keyword xkbFunction AnyOf ISOLock LatchGroup LatchMods LockControls LockGroup LockMods LockPointerButton MovePtr NoAction PointerButton SetControls SetGroup SetMods SetPtrDflt Terminate
|
|
49 syn keyword xkbTModif default hidden partial virtual
|
|
50 syn keyword xkbSect alphanumeric_keys alternate_group function_keys keypad_keys modifier_keys xkb_compatibility xkb_geometry xkb_keycodes xkb_keymap xkb_semantics xkb_symbols xkb_types
|
|
51
|
|
52 " Define the default highlighting
|
|
53 if version >= 508 || !exists("did_xkb_syntax_inits")
|
|
54 if version < 508
|
|
55 let did_xkb_syntax_inits = 1
|
|
56 command -nargs=+ HiLink hi link <args>
|
|
57 else
|
|
58 command -nargs=+ HiLink hi def link <args>
|
|
59 endif
|
|
60
|
|
61 HiLink xkbModif xkbPreproc
|
|
62 HiLink xkbTModif xkbPreproc
|
|
63 HiLink xkbPreproc Preproc
|
|
64
|
|
65 HiLink xkbIdentifier Keyword
|
|
66 HiLink xkbFunction Function
|
|
67 HiLink xkbSect Type
|
|
68 HiLink xkbPhysicalKey Identifier
|
|
69 HiLink xkbKeyword Keyword
|
|
70
|
|
71 HiLink xkbComment Comment
|
|
72 HiLink xkbTodo Todo
|
|
73
|
|
74 HiLink xkbConstant Constant
|
|
75 HiLink xkbString String
|
|
76
|
|
77 HiLink xkbSpecialChar xkbSpecial
|
|
78 HiLink xkbSpecial Special
|
|
79
|
|
80 HiLink xkbParenError xkbBalancingError
|
|
81 HiLink xkbBraceError xkbBalancingError
|
|
82 HiLink xkbBraketError xkbBalancingError
|
|
83 HiLink xkbBalancingError xkbError
|
|
84 HiLink xkbCommentStartError xkbCommentError
|
|
85 HiLink xkbCommentError xkbError
|
|
86 HiLink xkbError Error
|
|
87
|
|
88 delcommand HiLink
|
|
89 endif
|
|
90
|
|
91 let b:current_syntax = "xkb"
|