Mercurial > vim
annotate runtime/syntax/uil.vim @ 7426:779a7c14c795 v7.4.1017
commit https://github.com/vim/vim/commit/8f79acdf7ede2693fbda53c3c9693f16db4f193b
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Jan 1 14:48:20 2016 +0100
patch 7.4.1017
Problem: When there is a backslash in an option ":set -=" doesn't work.
Solution: Handle a backslash better. (Jacob Niehus) Add a new test, merge
in old test.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 01 Jan 2016 15:00:04 +0100 |
parents | 2eb30f341e8d |
children | 43efa4f5a8ea |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: Motif UIL (User Interface Language) | |
3 " Maintainer: Thomas Koehler <jean-luc@picard.franken.de> | |
4681
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
3513
diff
changeset
|
4 " Last Change: 2013 May 23 |
2034 | 5 " URL: http://gott-gehabt.de/800_wer_wir_sind/thomas/Homepage/Computer/vim/syntax/uil.vim |
6 | |
7 | 7 " Quit when a syntax file was already loaded |
8 if version < 600 | |
9 syntax clear | |
10 elseif exists("b:current_syntax") | |
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 | |
3513 | 23 " String and Character constants |
7 | 24 " Highlight special characters (those which have a backslash) differently |
25 syn match uilSpecial contained "\\\d\d\d\|\\." | |
3513 | 26 syn region uilString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell,uilSpecial |
7 | 27 syn match uilCharacter "'[^\\]'" |
4681
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
3513
diff
changeset
|
28 syn region uilString start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@Spell,uilSpecial |
7 | 29 syn match uilSpecialCharacter "'\\.'" |
4681
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
3513
diff
changeset
|
30 syn match uilSpecialStatement "Xm[^ =(){}:;]*" |
7 | 31 syn match uilSpecialFunction "MrmNcreateCallback" |
4681
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
3513
diff
changeset
|
32 syn match uilRessource "XmN[^ =(){}:;]*" |
7 | 33 |
34 syn match uilNumber "-\=\<\d*\.\=\d\+\(e\=f\=\|[uU]\=[lL]\=\)\>" | |
3513 | 35 syn match uilNumber "0[xX]\x\+\>" |
7 | 36 |
3513 | 37 syn region uilComment start="/\*" end="\*/" contains=@Spell,uilTodo |
38 syn match uilComment "!.*" contains=@Spell,uilTodo | |
7 | 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. | |
50 " For version 5.7 and earlier: only when not done already | |
51 " For version 5.8 and later: only when an item doesn't have highlighting yet | |
52 if version >= 508 || !exists("did_uil_syn_inits") | |
53 if version < 508 | |
54 let did_uil_syn_inits = 1 | |
55 command -nargs=+ HiLink hi link <args> | |
56 else | |
57 command -nargs=+ HiLink hi def link <args> | |
58 endif | |
59 | |
60 " The default highlighting. | |
61 HiLink uilCharacter uilString | |
62 HiLink uilSpecialCharacter uilSpecial | |
63 HiLink uilNumber uilString | |
64 HiLink uilCommentError uilError | |
65 HiLink uilInclude uilPreCondit | |
66 HiLink uilDefine uilPreCondit | |
67 HiLink uilIncluded uilString | |
68 HiLink uilSpecialFunction uilRessource | |
69 HiLink uilRessource Identifier | |
70 HiLink uilSpecialStatement Keyword | |
71 HiLink uilError Error | |
72 HiLink uilPreCondit PreCondit | |
73 HiLink uilType Type | |
74 HiLink uilString String | |
75 HiLink uilComment Comment | |
76 HiLink uilSpecial Special | |
77 HiLink uilTodo Todo | |
78 | |
79 delcommand HiLink | |
80 endif | |
81 | |
82 | |
83 let b:current_syntax = "uil" | |
84 | |
85 " vim: ts=8 |