blob: 3637b9f3b686a4849668d899359525a51aaa1809 [file] [log] [blame]
ObserverOfTime4f9074b2023-11-11 09:12:27 +01001" Vim syntax file
2" Language: XCompose
3" Maintainer: ObserverOfTime <chronobserver@disroot.org>
4" Filenames: .XCompose, Compose
5" Last Change: 2023 Nov 09
6
7" Comments
8syn keyword xcomposeTodo contained TODO FIXME XXX
9syn match xcomposeComment /#.*/ contains=xcomposeTodo
10
11" Includes
12syn keyword xcomposeInclude include nextgroup=xcomposeFile skipwhite
13syn match xcomposeFile /"\([^"]\|\\"\)\+"/ contained
14syn match xcomposeSubstitution /%[HLS]/ contained containedin=xcomposeFile
15
16" Modifiers
17syn keyword xcomposeModifier Ctrl Lock Caps Shift Alt Meta None
18syn match xcomposeModifierPrefix /\s*\zs[!~]\ze\s*/
19
20" Keysyms
21syn match xcomposeKeysym /<[A-Za-z0-9_]\+>/
22syn match xcomposeKeysym /[A-Za-z0-9_]\+/ contained
23syn match xcomposeString /"\([^"]\|\\"\)\+"/ contained nextgroup=xcomposeKeysym skipwhite
24syn match xcomposeColon /:/ nextgroup=xcomposeKeysym,xcomposeString skipwhite
25
26hi def link xcomposeColon Delimiter
27hi def link xcomposeComment Comment
28hi def link xcomposeFile String
29hi def link xcomposeInclude Include
30hi def link xcomposeKeysym Constant
31hi def link xcomposeModifier Function
32hi def link xcomposeModifierPrefix Operator
33hi def link xcomposeString String
34hi def link xcomposeSubstitution Special
35hi def link xcomposeTodo Todo
36
37let b:current_syntax = 'xcompose'