blob: ccf07d5a242ad5f6fcf005468eea8de5b9c33acd [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
Bram Moolenaar071d4272004-06-13 20:20:40 +000049
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020050" The default highlighting.
Bram Moolenaarf37506f2016-08-31 22:22:10 +020051hi def link uilCharacter uilString
52hi def link uilSpecialCharacter uilSpecial
53hi def link uilNumber uilString
54hi def link uilCommentError uilError
55hi def link uilInclude uilPreCondit
56hi def link uilDefine uilPreCondit
57hi def link uilIncluded uilString
58hi def link uilSpecialFunction uilRessource
59hi def link uilRessource Identifier
60hi def link uilSpecialStatement Keyword
61hi def link uilError Error
62hi def link uilPreCondit PreCondit
63hi def link uilType Type
64hi def link uilString String
65hi def link uilComment Comment
66hi def link uilSpecial Special
67hi def link uilTodo Todo
Bram Moolenaar071d4272004-06-13 20:20:40 +000068
Bram Moolenaar071d4272004-06-13 20:20:40 +000069
70
71let b:current_syntax = "uil"
72
73" vim: ts=8