Mercurial > vim
annotate runtime/syntax/kix.vim @ 32023:e8325653b814 v9.0.1343
patch 9.0.1343: check for OSC escape sequence doesn't work
Commit: https://github.com/vim/vim/commit/3451789f58b24d48fc97301a01a8d27bd154caf5
Author: Johan Mattsson <39247600+mjunix@users.noreply.github.com>
Date: Thu Feb 23 12:46:04 2023 +0000
patch 9.0.1343: check for OSC escape sequence doesn't work
Problem: Check for OSC escape sequence doesn't work.
Solution: Move square bracket to the right place. (Johan Mattsson,
closes #12048)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 23 Feb 2023 14:00:04 +0100 |
parents | 46763b01cd9a |
children |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: KixTart 95, Kix2001 Windows script language http://kixtart.org/ | |
3 " Maintainer: Richard Howarth <rhowarth@sgb.co.uk> | |
4 " Last Change: 2003 May 11 | |
5 " URL: http://www.howsoft.demon.co.uk/ | |
6 | |
7 " KixTart files identified by *.kix extension. | |
8 | |
9 " Amendment History: | |
10 " 26 April 2001: RMH | |
11 " Removed development comments from distro version | |
12 " Renamed "Kix*" to "kix*" for consistancy | |
13 " Changes made in preperation for VIM version 5.8/6.00 | |
14 | |
15 " TODO: | |
16 " Handle arrays highlighting | |
17 " Handle object highlighting | |
18 " The next two may not be possible: | |
19 " Work out how to error too many "(", i.e. (() should be an error. | |
20 " Similarly, "if" without "endif" and similar constructs should error. | |
21 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
22 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
23 if exists("b:current_syntax") |
7 | 24 finish |
25 endif | |
26 | |
27 syn case match | |
28 syn keyword kixTODO TODO FIX XXX contained | |
29 | |
30 " Case insensitive language. | |
31 syn case ignore | |
32 | |
33 " Kix statements | |
34 syn match kixStatement "?" | |
35 syn keyword kixStatement beep big break | |
36 syn keyword kixStatement call cd cls color cookie1 copy | |
37 syn keyword kixStatement del dim display | |
38 syn keyword kixStatement exit | |
39 syn keyword kixStatement flushkb | |
40 syn keyword kixStatement get gets global go gosub goto | |
41 syn keyword kixStatement md | |
42 syn keyword kixStatement password play | |
43 syn keyword kixStatement quit | |
44 syn keyword kixStatement rd return run | |
45 syn keyword kixStatement set setl setm settime shell sleep small | |
46 syn keyword kixStatement use | |
47 | |
48 " Kix2001 | |
49 syn keyword kixStatement debug function endfunction redim | |
50 | |
51 " Simple variables | |
52 syn match kixNotVar "\$\$\|@@\|%%" transparent contains=NONE | |
53 syn match kixLocalVar "\$\w\+" | |
54 syn match kixMacro "@\w\+" | |
55 syn match kixEnvVar "%\w\+" | |
56 | |
57 " Destination labels | |
58 syn match kixLabel ":\w\+\>" | |
59 | |
60 " Identify strings, trap unterminated strings | |
61 syn match kixStringError +".*\|'.*+ | |
62 syn region kixDoubleString oneline start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=kixLocalVar,kixMacro,kixEnvVar,kixNotVar | |
63 syn region kixSingleString oneline start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=kixLocalVar,kixMacro,kixEnvVar,kixNotVar | |
64 | |
65 " Operators | |
66 syn match kixOperator "+\|-\|\*\|/\|=\|&\||" | |
67 syn keyword kixOperator and or | |
68 " Kix2001 | |
69 syn match kixOperator "==" | |
70 syn keyword kixOperator not | |
71 | |
72 " Numeric constants | |
73 syn match kixInteger "-\=\<\d\+\>" contains=NONE | |
74 syn match kixFloat "-\=\.\d\+\>\|-\=\<\d\+\.\d\+\>" contains=NONE | |
75 | |
76 " Hex numeric constants | |
77 syn match kixHex "\&\x\+\>" contains=NONE | |
78 | |
79 " Other contants | |
80 " Kix2001 | |
81 syn keyword kixConstant on off | |
82 | |
83 " Comments | |
84 syn match kixComment ";.*$" contains=kixTODO | |
85 | |
86 " Trap unmatched parenthesis | |
87 syn match kixParenCloseError ")" | |
88 syn region kixParen oneline transparent start="(" end=")" contains=ALLBUT,kixParenCloseError | |
89 | |
90 " Functions (Builtin + UDF) | |
91 syn match kixFunction "\w\+("he=e-1,me=e-1 contains=ALL | |
92 | |
93 " Trap unmatched brackets | |
94 syn match kixBrackCloseError "\]" | |
95 syn region kixBrack transparent start="\[" end="\]" contains=ALLBUT,kixBrackCloseError | |
96 | |
97 " Clusters for ALLBUT shorthand | |
98 syn cluster kixIfBut contains=kixIfError,kixSelectOK,kixDoOK,kixWhileOK,kixForEachOK,kixForNextOK | |
99 syn cluster kixSelectBut contains=kixSelectError,kixIfOK,kixDoOK,kixWhileOK,kixForEachOK,kixForNextOK | |
100 syn cluster kixDoBut contains=kixDoError,kixSelectOK,kixIfOK,kixWhileOK,kixForEachOK,kixForNextOK | |
101 syn cluster kixWhileBut contains=kixWhileError,kixSelectOK,kixIfOK,kixDoOK,kixForEachOK,kixForNextOK | |
102 syn cluster kixForEachBut contains=kixForEachError,kixSelectOK,kixIfOK,kixDoOK,kixForNextOK,kixWhileOK | |
103 syn cluster kixForNextBut contains=kixForNextError,kixSelectOK,kixIfOK,kixDoOK,kixForEachOK,kixWhileOK | |
104 " Condtional construct errors. | |
105 syn match kixIfError "\<if\>\|\<else\>\|\<endif\>" | |
106 syn match kixIfOK contained "\<if\>\|\<else\>\|\<endif\>" | |
107 syn region kixIf transparent matchgroup=kixIfOK start="\<if\>" end="\<endif\>" contains=ALLBUT,@kixIfBut | |
108 syn match kixSelectError "\<select\>\|\<case\>\|\<endselect\>" | |
109 syn match kixSelectOK contained "\<select\>\|\<case\>\|\<endselect\>" | |
110 syn region kixSelect transparent matchgroup=kixSelectOK start="\<select\>" end="\<endselect\>" contains=ALLBUT,@kixSelectBut | |
111 | |
112 " Program control constructs. | |
113 syn match kixDoError "\<do\>\|\<until\>" | |
114 syn match kixDoOK contained "\<do\>\|\<until\>" | |
115 syn region kixDo transparent matchgroup=kixDoOK start="\<do\>" end="\<until\>" contains=ALLBUT,@kixDoBut | |
116 syn match kixWhileError "\<while\>\|\<loop\>" | |
117 syn match kixWhileOK contained "\<while\>\|\<loop\>" | |
118 syn region kixWhile transparent matchgroup=kixWhileOK start="\<while\>" end="\<loop\>" contains=ALLBUT,@kixWhileBut | |
119 syn match kixForNextError "\<for\>\|\<to\>\|\<step\>\|\<next\>" | |
120 syn match kixForNextOK contained "\<for\>\|\<to\>\|\<step\>\|\<next\>" | |
121 syn region kixForNext transparent matchgroup=kixForNextOK start="\<for\>" end="\<next\>" contains=ALLBUT,@kixForBut | |
122 syn match kixForEachError "\<for each\>\|\<in\>\|\<next\>" | |
123 syn match kixForEachOK contained "\<for each\>\|\<in\>\|\<next\>" | |
124 syn region kixForEach transparent matchgroup=kixForEachOK start="\<for each\>" end="\<next\>" contains=ALLBUT,@kixForEachBut | |
125 | |
126 " Expressions | |
127 syn match kixExpression "<\|>\|<=\|>=\|<>" | |
128 | |
129 | |
130 " Default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
131 " Set default highlight only if it doesn't already have a value. |
7 | 132 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
133 hi def link kixDoubleString String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
134 hi def link kixSingleString String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
135 hi def link kixStatement Statement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
136 hi def link kixRepeat Repeat |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
137 hi def link kixComment Comment |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
138 hi def link kixBuiltin Function |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
139 hi def link kixLocalVar Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
140 hi def link kixMacro Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
141 hi def link kixEnvVar Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
142 hi def link kixLabel Type |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
143 hi def link kixFunction Function |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
144 hi def link kixInteger Number |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
145 hi def link kixHex Number |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
146 hi def link kixFloat Number |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
147 hi def link kixOperator Operator |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
148 hi def link kixExpression Operator |
7 | 149 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
150 hi def link kixParenCloseError Error |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
151 hi def link kixBrackCloseError Error |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
152 hi def link kixStringError Error |
7 | 153 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
154 hi def link kixWhileError Error |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
155 hi def link kixWhileOK Conditional |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
156 hi def link kixDoError Error |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
157 hi def link kixDoOK Conditional |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
158 hi def link kixIfError Error |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
159 hi def link kixIfOK Conditional |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
160 hi def link kixSelectError Error |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
161 hi def link kixSelectOK Conditional |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
162 hi def link kixForNextError Error |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
163 hi def link kixForNextOK Conditional |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
164 hi def link kixForEachError Error |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
165 hi def link kixForEachOK Conditional |
7 | 166 |
167 | |
168 let b:current_syntax = "kix" | |
169 | |
170 " vim: ts=8 sw=2 |