1" Vim syntax file 2" Language: Motif UIL (User Interface Language) 3" Maintainer: Thomas Koehler <[email protected]> 4" Last Change: 2009 Dec 04 5" URL: http://gott-gehabt.de/800_wer_wir_sind/thomas/Homepage/Computer/vim/syntax/uil.vim 6 7 8" Quit when a syntax file was already loaded 9if version < 600 10 syntax clear 11elseif exists("b:current_syntax") 12 finish 13endif 14 15" A bunch of useful keywords 16syn keyword uilType arguments callbacks color 17syn keyword uilType compound_string controls end 18syn keyword uilType exported file include 19syn keyword uilType module object procedure 20syn keyword uilType user_defined xbitmapfile 21 22syn keyword uilTodo contained TODO 23 24" String and Character contstants 25" Highlight special characters (those which have a backslash) differently 26syn match uilSpecial contained "\\\d\d\d\|\\." 27syn region uilString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=uilSpecial 28syn match uilCharacter "'[^\\]'" 29syn region uilString start=+'+ skip=+\\\\\|\\"+ end=+'+ contains=uilSpecial 30syn match uilSpecialCharacter "'\\.'" 31syn match uilSpecialStatement "Xm[^ =(){}]*" 32syn match uilSpecialFunction "MrmNcreateCallback" 33syn match uilRessource "XmN[^ =(){}]*" 34 35syn match uilNumber "-\=\<\d*\.\=\d\+\(e\=f\=\|[uU]\=[lL]\=\)\>" 36syn match uilNumber "0[xX][0-9a-fA-F]\+\>" 37 38syn region uilComment start="/\*" end="\*/" contains=uilTodo 39syn match uilComment "!.*" contains=uilTodo 40syn match uilCommentError "\*/" 41 42syn region uilPreCondit start="^#\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=uilComment,uilString,uilCharacter,uilNumber,uilCommentError 43syn match uilIncluded contained "<[^>]*>" 44syn match uilInclude "^#\s*include\s\+." contains=uilString,uilIncluded 45syn match uilLineSkip "\\$" 46syn region uilDefine start="^#\s*\(define\>\|undef\>\)" end="$" contains=uilLineSkip,uilComment,uilString,uilCharacter,uilNumber,uilCommentError 47 48syn sync ccomment uilComment 49 50" Define the default highlighting. 51" For version 5.7 and earlier: only when not done already 52" For version 5.8 and later: only when an item doesn't have highlighting yet 53if version >= 508 || !exists("did_uil_syn_inits") 54 if version < 508 55 let did_uil_syn_inits = 1 56 command -nargs=+ HiLink hi link <args> 57 else 58 command -nargs=+ HiLink hi def link <args> 59 endif 60 61 " The default highlighting. 62 HiLink uilCharacter uilString 63 HiLink uilSpecialCharacter uilSpecial 64 HiLink uilNumber uilString 65 HiLink uilCommentError uilError 66 HiLink uilInclude uilPreCondit 67 HiLink uilDefine uilPreCondit 68 HiLink uilIncluded uilString 69 HiLink uilSpecialFunction uilRessource 70 HiLink uilRessource Identifier 71 HiLink uilSpecialStatement Keyword 72 HiLink uilError Error 73 HiLink uilPreCondit PreCondit 74 HiLink uilType Type 75 HiLink uilString String 76 HiLink uilComment Comment 77 HiLink uilSpecial Special 78 HiLink uilTodo Todo 79 80 delcommand HiLink 81endif 82 83 84let b:current_syntax = "uil" 85 86" vim: ts=8 87