blob: 088a0f6c8605a471014d1b136a91939521cd7bf4 [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 Moolenaar64d8e252016-09-06 22:12:34 +02004" Please be aware: I'm often slow to answer email due to a high
5" non-computer related workload (sometimes 4-8 weeks)
6" Last Change: 2016 September 6
Bram Moolenaar5c736222010-01-06 20:54:52 +01007" URL: http://gott-gehabt.de/800_wer_wir_sind/thomas/Homepage/Computer/vim/syntax/uil.vim
8
Bram Moolenaar89bcfda2016-08-30 23:26:57 +02009" quit when a syntax file was already loaded
10if exists("b:current_syntax")
Bram Moolenaar071d4272004-06-13 20:20:40 +000011 finish
12endif
13
14" A bunch of useful keywords
15syn keyword uilType arguments callbacks color
16syn keyword uilType compound_string controls end
17syn keyword uilType exported file include
18syn keyword uilType module object procedure
19syn keyword uilType user_defined xbitmapfile
20
21syn keyword uilTodo contained TODO
22
Bram Moolenaar1aeaf8c2012-05-18 13:46:39 +020023" String and Character constants
Bram Moolenaar071d4272004-06-13 20:20:40 +000024" Highlight special characters (those which have a backslash) differently
25syn match uilSpecial contained "\\\d\d\d\|\\."
Bram Moolenaar1aeaf8c2012-05-18 13:46:39 +020026syn region uilString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell,uilSpecial
Bram Moolenaar071d4272004-06-13 20:20:40 +000027syn match uilCharacter "'[^\\]'"
Bram Moolenaar543b7ef2013-06-01 14:50:56 +020028syn region uilString start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@Spell,uilSpecial
Bram Moolenaar071d4272004-06-13 20:20:40 +000029syn match uilSpecialCharacter "'\\.'"
Bram Moolenaar543b7ef2013-06-01 14:50:56 +020030syn match uilSpecialStatement "Xm[^ =(){}:;]*"
Bram Moolenaar071d4272004-06-13 20:20:40 +000031syn match uilSpecialFunction "MrmNcreateCallback"
Bram Moolenaar543b7ef2013-06-01 14:50:56 +020032syn match uilRessource "XmN[^ =(){}:;]*"
Bram Moolenaar071d4272004-06-13 20:20:40 +000033
34syn match uilNumber "-\=\<\d*\.\=\d\+\(e\=f\=\|[uU]\=[lL]\=\)\>"
Bram Moolenaar1aeaf8c2012-05-18 13:46:39 +020035syn match uilNumber "0[xX]\x\+\>"
Bram Moolenaar071d4272004-06-13 20:20:40 +000036
Bram Moolenaar1aeaf8c2012-05-18 13:46:39 +020037syn region uilComment start="/\*" end="\*/" contains=@Spell,uilTodo
38syn match uilComment "!.*" contains=@Spell,uilTodo
Bram Moolenaar071d4272004-06-13 20:20:40 +000039syn match uilCommentError "\*/"
40
41syn region uilPreCondit start="^#\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=uilComment,uilString,uilCharacter,uilNumber,uilCommentError
42syn match uilIncluded contained "<[^>]*>"
43syn match uilInclude "^#\s*include\s\+." contains=uilString,uilIncluded
44syn match uilLineSkip "\\$"
45syn region uilDefine start="^#\s*\(define\>\|undef\>\)" end="$" contains=uilLineSkip,uilComment,uilString,uilCharacter,uilNumber,uilCommentError
46
47syn sync ccomment uilComment
48
49" Define the default highlighting.
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020050" Only when an item doesn't have highlighting yet
Bram Moolenaar071d4272004-06-13 20:20:40 +000051
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020052" The default highlighting.
Bram Moolenaarf37506f2016-08-31 22:22:10 +020053hi def link uilCharacter uilString
54hi def link uilSpecialCharacter uilSpecial
55hi def link uilNumber uilString
56hi def link uilCommentError uilError
57hi def link uilInclude uilPreCondit
58hi def link uilDefine uilPreCondit
59hi def link uilIncluded uilString
60hi def link uilSpecialFunction uilRessource
61hi def link uilRessource Identifier
62hi def link uilSpecialStatement Keyword
63hi def link uilError Error
64hi def link uilPreCondit PreCondit
65hi def link uilType Type
66hi def link uilString String
67hi def link uilComment Comment
68hi def link uilSpecial Special
69hi def link uilTodo Todo
Bram Moolenaar071d4272004-06-13 20:20:40 +000070
Bram Moolenaar071d4272004-06-13 20:20:40 +000071
72
73let b:current_syntax = "uil"
74
75" vim: ts=8