Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1 | " Vim syntax file |
| 2 | " Language: Motif UIL (User Interface Language) |
| 3 | " Maintainer: Thomas Koehler <jean-luc@picard.franken.de> |
Bram Moolenaar | 64d8e25 | 2016-09-06 22:12:34 +0200 | [diff] [blame] | 4 | " 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 Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 7 | " URL: http://gott-gehabt.de/800_wer_wir_sind/thomas/Homepage/Computer/vim/syntax/uil.vim |
| 8 | |
Bram Moolenaar | 89bcfda | 2016-08-30 23:26:57 +0200 | [diff] [blame] | 9 | " quit when a syntax file was already loaded |
| 10 | if exists("b:current_syntax") |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 11 | finish |
| 12 | endif |
| 13 | |
| 14 | " A bunch of useful keywords |
| 15 | syn keyword uilType arguments callbacks color |
| 16 | syn keyword uilType compound_string controls end |
| 17 | syn keyword uilType exported file include |
| 18 | syn keyword uilType module object procedure |
| 19 | syn keyword uilType user_defined xbitmapfile |
| 20 | |
| 21 | syn keyword uilTodo contained TODO |
| 22 | |
Bram Moolenaar | 1aeaf8c | 2012-05-18 13:46:39 +0200 | [diff] [blame] | 23 | " String and Character constants |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 24 | " Highlight special characters (those which have a backslash) differently |
| 25 | syn match uilSpecial contained "\\\d\d\d\|\\." |
Bram Moolenaar | 1aeaf8c | 2012-05-18 13:46:39 +0200 | [diff] [blame] | 26 | syn region uilString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell,uilSpecial |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 27 | syn match uilCharacter "'[^\\]'" |
Bram Moolenaar | 543b7ef | 2013-06-01 14:50:56 +0200 | [diff] [blame] | 28 | syn region uilString start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@Spell,uilSpecial |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 29 | syn match uilSpecialCharacter "'\\.'" |
Bram Moolenaar | 543b7ef | 2013-06-01 14:50:56 +0200 | [diff] [blame] | 30 | syn match uilSpecialStatement "Xm[^ =(){}:;]*" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 31 | syn match uilSpecialFunction "MrmNcreateCallback" |
Bram Moolenaar | 543b7ef | 2013-06-01 14:50:56 +0200 | [diff] [blame] | 32 | syn match uilRessource "XmN[^ =(){}:;]*" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 33 | |
| 34 | syn match uilNumber "-\=\<\d*\.\=\d\+\(e\=f\=\|[uU]\=[lL]\=\)\>" |
Bram Moolenaar | 1aeaf8c | 2012-05-18 13:46:39 +0200 | [diff] [blame] | 35 | syn match uilNumber "0[xX]\x\+\>" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 36 | |
Bram Moolenaar | 1aeaf8c | 2012-05-18 13:46:39 +0200 | [diff] [blame] | 37 | syn region uilComment start="/\*" end="\*/" contains=@Spell,uilTodo |
| 38 | syn match uilComment "!.*" contains=@Spell,uilTodo |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 39 | syn match uilCommentError "\*/" |
| 40 | |
| 41 | syn region uilPreCondit start="^#\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=uilComment,uilString,uilCharacter,uilNumber,uilCommentError |
| 42 | syn match uilIncluded contained "<[^>]*>" |
| 43 | syn match uilInclude "^#\s*include\s\+." contains=uilString,uilIncluded |
| 44 | syn match uilLineSkip "\\$" |
| 45 | syn region uilDefine start="^#\s*\(define\>\|undef\>\)" end="$" contains=uilLineSkip,uilComment,uilString,uilCharacter,uilNumber,uilCommentError |
| 46 | |
| 47 | syn sync ccomment uilComment |
| 48 | |
| 49 | " Define the default highlighting. |
Bram Moolenaar | 89bcfda | 2016-08-30 23:26:57 +0200 | [diff] [blame] | 50 | " Only when an item doesn't have highlighting yet |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 51 | |
Bram Moolenaar | 89bcfda | 2016-08-30 23:26:57 +0200 | [diff] [blame] | 52 | " The default highlighting. |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 53 | hi def link uilCharacter uilString |
| 54 | hi def link uilSpecialCharacter uilSpecial |
| 55 | hi def link uilNumber uilString |
| 56 | hi def link uilCommentError uilError |
| 57 | hi def link uilInclude uilPreCondit |
| 58 | hi def link uilDefine uilPreCondit |
| 59 | hi def link uilIncluded uilString |
| 60 | hi def link uilSpecialFunction uilRessource |
| 61 | hi def link uilRessource Identifier |
| 62 | hi def link uilSpecialStatement Keyword |
| 63 | hi def link uilError Error |
| 64 | hi def link uilPreCondit PreCondit |
| 65 | hi def link uilType Type |
| 66 | hi def link uilString String |
| 67 | hi def link uilComment Comment |
| 68 | hi def link uilSpecial Special |
| 69 | hi def link uilTodo Todo |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 70 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 71 | |
| 72 | |
| 73 | let b:current_syntax = "uil" |
| 74 | |
| 75 | " vim: ts=8 |