blob: 22be56d7250842d8b33ae1ec2e6b29039bcf88c8 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" 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>
Bram Moolenaarcb80aa22020-10-26 21:12:46 +01005" Last Change: 2020 Oct 18
Bram Moolenaar071d4272004-06-13 20:20:40 +00006" URL: http://trific.ath.cx/Ftp/vim/syntax/xkb.vim
7
8" Setup
Bram Moolenaar89bcfda2016-08-30 23:26:57 +02009" quit when a syntax file was already loaded
10if exists("b:current_syntax")
11 finish
Bram Moolenaar071d4272004-06-13 20:20:40 +000012endif
13
14syn case match
15syn sync minlines=100
16
17" Comments
18syn region xkbComment start="//" skip="\\$" end="$" keepend contains=xkbTodo
19syn region xkbComment start="/\*" matchgroup=NONE end="\*/" contains=xkbCommentStartError,xkbTodo
20syn match xkbCommentError "\*/"
21syntax match xkbCommentStartError "/\*" contained
22syn sync ccomment xkbComment
23syn keyword xkbTodo TODO FIXME contained
24
25" Literal strings
26syn match xkbSpecialChar "\\\d\d\d\|\\." contained
27syn region xkbString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=xkbSpecialChar oneline
28
29" Catch errors caused by wrong parenthesization
30syn region xkbParen start='(' end=')' contains=ALLBUT,xkbParenError,xkbSpecial,xkbTodo transparent
31syn match xkbParenError ")"
32syn region xkbBrace start='{' end='}' contains=ALLBUT,xkbBraceError,xkbSpecial,xkbTodo transparent
33syn match xkbBraceError "}"
34syn region xkbBracket start='\[' end='\]' contains=ALLBUT,xkbBracketError,xkbSpecial,xkbTodo transparent
35syn match xkbBracketError "\]"
36
37" Physical keys
38syn match xkbPhysicalKey "<\w\+>"
39
40" Keywords
41syn keyword xkbPreproc augment include replace
42syn keyword xkbConstant False True
43syn keyword xkbModif override replace
Bram Moolenaarcb80aa22020-10-26 21:12:46 +010044syn 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 setMods shape slant solid symbols text top type useModMapMods virtualModifier virtualMods virtual_modifiers weight whichModState width
Bram Moolenaar071d4272004-06-13 20:20:40 +000045syn keyword xkbFunction AnyOf ISOLock LatchGroup LatchMods LockControls LockGroup LockMods LockPointerButton MovePtr NoAction PointerButton SetControls SetGroup SetMods SetPtrDflt Terminate
46syn keyword xkbTModif default hidden partial virtual
47syn 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
48
49" Define the default highlighting
Bram Moolenaar071d4272004-06-13 20:20:40 +000050
Bram Moolenaarf37506f2016-08-31 22:22:10 +020051hi def link xkbModif xkbPreproc
52hi def link xkbTModif xkbPreproc
53hi def link xkbPreproc Preproc
Bram Moolenaar071d4272004-06-13 20:20:40 +000054
Bram Moolenaarf37506f2016-08-31 22:22:10 +020055hi def link xkbIdentifier Keyword
56hi def link xkbFunction Function
57hi def link xkbSect Type
58hi def link xkbPhysicalKey Identifier
59hi def link xkbKeyword Keyword
Bram Moolenaar071d4272004-06-13 20:20:40 +000060
Bram Moolenaarf37506f2016-08-31 22:22:10 +020061hi def link xkbComment Comment
62hi def link xkbTodo Todo
Bram Moolenaar071d4272004-06-13 20:20:40 +000063
Bram Moolenaarf37506f2016-08-31 22:22:10 +020064hi def link xkbConstant Constant
65hi def link xkbString String
Bram Moolenaar071d4272004-06-13 20:20:40 +000066
Bram Moolenaarf37506f2016-08-31 22:22:10 +020067hi def link xkbSpecialChar xkbSpecial
68hi def link xkbSpecial Special
Bram Moolenaar071d4272004-06-13 20:20:40 +000069
Bram Moolenaarf37506f2016-08-31 22:22:10 +020070hi def link xkbParenError xkbBalancingError
71hi def link xkbBraceError xkbBalancingError
72hi def link xkbBraketError xkbBalancingError
73hi def link xkbBalancingError xkbError
74hi def link xkbCommentStartError xkbCommentError
75hi def link xkbCommentError xkbError
76hi def link xkbError Error
Bram Moolenaar071d4272004-06-13 20:20:40 +000077
Bram Moolenaar071d4272004-06-13 20:20:40 +000078
79let b:current_syntax = "xkb"