Add /src/vim/release.sh, a script to compile and install vim
[msysgit.git] / share / vim / vim58 / syntax / xkb.vim
blobfcc9a8c175dd2bdb5b02e1988c00edff89d9d8c0
1 " Vim syntax file
2 " Language: XKB (X Keyboard Extension) components
3 " Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>
4 " Last Change: 2001 Apr 27
5 " URI: http://physics.muni.cz/~yeti/download/xkb.vim
7 " FIXME: I don't fully understand XKB. (But apparently, nobody does.)
8 "        So this file highlights something, somehow, at least.
9 " TODO: everything, and add `display' where appropriate
11 " Setup {{{
12 " React to possibly already-defined syntax.
13 " For version 5.x: Clear all syntax items unconditionally
14 " For version 6.x: Quit when a syntax file was already loaded
15 if version >= 600
16   if exists("b:current_syntax")
17     finish
18   endif
19 else
20   syntax clear
21 endif
23 syn case match
24 syn sync minlines=100
25 " }}}
26 " Comments {{{
27 syn region xkbComment start="//" skip="\\$" end="$" keepend contains=xkbTodo
28 syn region xkbComment start="/\*" matchgroup=NONE end="\*/" contains=xkbCommentStartError,xkbTodo
29 syn match xkbCommentError "\*/"
30 syntax match xkbCommentStartError "/\*" contained
31 syn sync ccomment xkbComment
32 syn keyword xkbTodo TODO FIXME contained
33 " }}}
34 " Literal strings {{{
35 syn match xkbSpecialChar "\\\d\d\d\|\\." contained
36 syn region xkbString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=xkbSpecialChar oneline
37 " }}}
38 " Catch errors caused by wrong parenthesization {{{
39 " For parentheses
40 syn region xkbParen start='(' end=')' contains=ALLBUT,xkbParenError,xkbSpecial,xkbTodo transparent
41 syn match xkbParenError ")"
42 " Idem for curly braces
43 syn region xkbBrace start='{' end='}' contains=ALLBUT,xkbBraceError,xkbSpecial,xkbTodo transparent
44 syn match xkbBraceError "}"
45 " Idem for brackets
46 syn region xkbBracket start='\[' end='\]' contains=ALLBUT,xkbBracketError,xkbSpecial,xkbTodo transparent
47 syn match xkbBracketError "\]"
48 " }}}
49 " Physical keys {{{
50 syn match xkbPhysicalKey "<\w\+>"
51 " }}}
52 " Keywords {{{
53 syn keyword xkbPreproc augment include replace
54 syn keyword xkbConstant False True
55 syn keyword xkbModif override replace
56 syn keyword xkbIdentifier action affect alias allowExplicit approx baseColor clearLocks color controls cornerRadius ctrls description driveskbd font fontSize gap group height indicator interpret key keys labelColor latchToLock left level_name map maximum minimum modifier_map modifiers name offColor onColor outline preserve priority repeat row section section shape slant solid symbols text top type useModMapMods virtualModifier virtualMods virtual_modifiers weight whichModState width
57 syn keyword xkbAction ISOLock LatchGroup LatchMods LockControls LockGroup LockMods NoAction SetControls SetGroup SetMods Terminate
58 syn keyword xkbTModif default hidden partial virtual
59 syn keyword xkbSect alphanumeric_keys alternate_group keypad_keys modifier_keys xkb_compatibility xkb_geometry xkb_keycodes xkb_keymap xkb_semantics xkb_symbols xkb_types
60 " }}}
61 " Define the default highlighting {{{
62 " For version 5.7 and earlier: Only when not done already
63 " For version 5.8 and later: Only when an item doesn't have highlighting yet
64 if version >= 508 || !exists("did_xkb_syntax_inits")
65   if version < 508
66     let did_xkb_syntax_inits = 1
67     command -nargs=+ HiLink hi link <args>
68   else
69     command -nargs=+ HiLink hi def link <args>
70   endif
72   HiLink xkbModif             xkbPreproc
73   HiLink xkbTModif            xkbPreproc
74   HiLink xkbPreproc           Preproc
76   HiLink xkbIdentifier        Keyword
77   HiLink xkbAction            Function
78   HiLink xkbSect              Type
79   HiLink xkbPhysicalKey       Identifier
80   HiLink xkbKeyword           Keyword
82   HiLink xkbComment           Comment
83   HiLink xkbTodo              Todo
85   HiLink xkbConstant          Constant
86   HiLink xkbString            String
88   HiLink xkbSpecialChar       xkbSpecial
89   HiLink xkbSpecial           Special
91   HiLink xkbParenError        xkbBalancingError
92   HiLink xkbBraceError        xkbBalancingError
93   HiLink xkbBraketError       xkbBalancingError
94   HiLink xkbBalancingError    xkbError
95   HiLink xkbCommentStartError xkbCommentError
96   HiLink xkbCommentError      xkbError
97   HiLink xkbError             Error
99   delcommand HiLink
100 endif
101 " }}}
102 let b:current_syntax = "xkb"