blob: 689b187a25f8d08cc3b7bf965776f09229e1de74 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim syntax file
2" Language: Motif UIL (User Interface Language)
3" Maintainer: Thomas Koehler <jean-luc@picard.franken.de>
Bram Moolenaar543b7ef2013-06-01 14:50:56 +02004" Last Change: 2013 May 23
Bram Moolenaar5c736222010-01-06 20:54:52 +01005" URL: http://gott-gehabt.de/800_wer_wir_sind/thomas/Homepage/Computer/vim/syntax/uil.vim
6
Bram Moolenaar89bcfda2016-08-30 23:26:57 +02007" quit when a syntax file was already loaded
8if exists("b:current_syntax")
Bram Moolenaar071d4272004-06-13 20:20:40 +00009 finish
10endif
11
12" A bunch of useful keywords
13syn keyword uilType arguments callbacks color
14syn keyword uilType compound_string controls end
15syn keyword uilType exported file include
16syn keyword uilType module object procedure
17syn keyword uilType user_defined xbitmapfile
18
19syn keyword uilTodo contained TODO
20
Bram Moolenaar1aeaf8c2012-05-18 13:46:39 +020021" String and Character constants
Bram Moolenaar071d4272004-06-13 20:20:40 +000022" Highlight special characters (those which have a backslash) differently
23syn match uilSpecial contained "\\\d\d\d\|\\."
Bram Moolenaar1aeaf8c2012-05-18 13:46:39 +020024syn region uilString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell,uilSpecial
Bram Moolenaar071d4272004-06-13 20:20:40 +000025syn match uilCharacter "'[^\\]'"
Bram Moolenaar543b7ef2013-06-01 14:50:56 +020026syn region uilString start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@Spell,uilSpecial
Bram Moolenaar071d4272004-06-13 20:20:40 +000027syn match uilSpecialCharacter "'\\.'"
Bram Moolenaar543b7ef2013-06-01 14:50:56 +020028syn match uilSpecialStatement "Xm[^ =(){}:;]*"
Bram Moolenaar071d4272004-06-13 20:20:40 +000029syn match uilSpecialFunction "MrmNcreateCallback"
Bram Moolenaar543b7ef2013-06-01 14:50:56 +020030syn match uilRessource "XmN[^ =(){}:;]*"
Bram Moolenaar071d4272004-06-13 20:20:40 +000031
32syn match uilNumber "-\=\<\d*\.\=\d\+\(e\=f\=\|[uU]\=[lL]\=\)\>"
Bram Moolenaar1aeaf8c2012-05-18 13:46:39 +020033syn match uilNumber "0[xX]\x\+\>"
Bram Moolenaar071d4272004-06-13 20:20:40 +000034
Bram Moolenaar1aeaf8c2012-05-18 13:46:39 +020035syn region uilComment start="/\*" end="\*/" contains=@Spell,uilTodo
36syn match uilComment "!.*" contains=@Spell,uilTodo
Bram Moolenaar071d4272004-06-13 20:20:40 +000037syn match uilCommentError "\*/"
38
39syn region uilPreCondit start="^#\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=uilComment,uilString,uilCharacter,uilNumber,uilCommentError
40syn match uilIncluded contained "<[^>]*>"
41syn match uilInclude "^#\s*include\s\+." contains=uilString,uilIncluded
42syn match uilLineSkip "\\$"
43syn region uilDefine start="^#\s*\(define\>\|undef\>\)" end="$" contains=uilLineSkip,uilComment,uilString,uilCharacter,uilNumber,uilCommentError
44
45syn sync ccomment uilComment
46
47" Define the default highlighting.
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020048" Only when an item doesn't have highlighting yet
49command -nargs=+ HiLink hi def link <args>
Bram Moolenaar071d4272004-06-13 20:20:40 +000050
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020051" The default highlighting.
52HiLink uilCharacter uilString
53HiLink uilSpecialCharacter uilSpecial
54HiLink uilNumber uilString
55HiLink uilCommentError uilError
56HiLink uilInclude uilPreCondit
57HiLink uilDefine uilPreCondit
58HiLink uilIncluded uilString
59HiLink uilSpecialFunction uilRessource
60HiLink uilRessource Identifier
61HiLink uilSpecialStatement Keyword
62HiLink uilError Error
63HiLink uilPreCondit PreCondit
64HiLink uilType Type
65HiLink uilString String
66HiLink uilComment Comment
67HiLink uilSpecial Special
68HiLink uilTodo Todo
Bram Moolenaar071d4272004-06-13 20:20:40 +000069
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020070delcommand HiLink
Bram Moolenaar071d4272004-06-13 20:20:40 +000071
72
73let b:current_syntax = "uil"
74
75" vim: ts=8