annotate runtime/syntax/sdl.vim @ 31491:6d42026ad002 v9.0.1078

patch 9.0.1078: with the +vartabs feature indent folding may use wrong 'ts' Commit: https://github.com/vim/vim/commit/07146ad1d33ba0d36b324873e5c461931e6b025e Author: zeertzjq <zeertzjq@outlook.com> Date: Mon Dec 19 15:51:44 2022 +0000 patch 9.0.1078: with the +vartabs feature indent folding may use wrong 'ts' Problem: With the +vartabs feature indent folding may use wrong 'tabstop'. Solution: Use the "buf" argument instead of "curbuf".
author Bram Moolenaar <Bram@vim.org>
date Mon, 19 Dec 2022 17:00:05 +0100
parents 46763b01cd9a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: SDL
3237
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
3 " Maintainer: Michael Piefel <entwurf@piefel.de>
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Last Change: 2 May 2001
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 3237
diff changeset
6 " quit when a syntax file was already loaded
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 3237
diff changeset
7 if exists("b:current_syntax")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 if !exists("sdl_2000")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 syntax case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 " A bunch of useful SDL keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 syn keyword sdlStatement task else nextstate
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 syn keyword sdlStatement in out with from interface
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 syn keyword sdlStatement to via env and use
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn keyword sdlStatement process procedure block system service type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn keyword sdlStatement endprocess endprocedure endblock endsystem
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn keyword sdlStatement package endpackage connection endconnection
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn keyword sdlStatement channel endchannel connect
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn keyword sdlStatement synonym dcl signal gate timer signallist signalset
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn keyword sdlStatement create output set reset call
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn keyword sdlStatement operators literals
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn keyword sdlStatement active alternative any as atleast constants
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn keyword sdlStatement default endalternative endmacro endoperator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn keyword sdlStatement endselect endsubstructure external
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn keyword sdlStatement if then fi for import macro macrodefinition
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn keyword sdlStatement macroid mod nameclass nodelay not operator or
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn keyword sdlStatement parent provided referenced rem
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn keyword sdlStatement select spelling substructure xor
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn keyword sdlNewState state endstate
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn keyword sdlInput input start stop return none save priority
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn keyword sdlConditional decision enddecision join
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn keyword sdlVirtual virtual redefined finalized adding inherits
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn keyword sdlExported remote exported export
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 if !exists("sdl_no_96")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn keyword sdlStatement all axioms constant endgenerator endrefinement endservice
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn keyword sdlStatement error fpar generator literal map noequality ordering
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn keyword sdlStatement refinement returns revealed reverse service signalroute
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn keyword sdlStatement view viewed
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn keyword sdlExported imported
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 if exists("sdl_2000")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn keyword sdlStatement abstract aggregation association break choice composition
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn keyword sdlStatement continue endmethod handle method
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn keyword sdlStatement ordered private protected public
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn keyword sdlException exceptionhandler endexceptionhandler onexception
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn keyword sdlException catch new raise
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 " The same in uppercase
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn keyword sdlStatement TASK ELSE NEXTSTATE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn keyword sdlStatement IN OUT WITH FROM INTERFACE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn keyword sdlStatement TO VIA ENV AND USE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syn keyword sdlStatement PROCESS PROCEDURE BLOCK SYSTEM SERVICE TYPE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn keyword sdlStatement ENDPROCESS ENDPROCEDURE ENDBLOCK ENDSYSTEM
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 syn keyword sdlStatement PACKAGE ENDPACKAGE CONNECTION ENDCONNECTION
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn keyword sdlStatement CHANNEL ENDCHANNEL CONNECT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn keyword sdlStatement SYNONYM DCL SIGNAL GATE TIMER SIGNALLIST SIGNALSET
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn keyword sdlStatement CREATE OUTPUT SET RESET CALL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn keyword sdlStatement OPERATORS LITERALS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn keyword sdlStatement ACTIVE ALTERNATIVE ANY AS ATLEAST CONSTANTS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn keyword sdlStatement DEFAULT ENDALTERNATIVE ENDMACRO ENDOPERATOR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn keyword sdlStatement ENDSELECT ENDSUBSTRUCTURE EXTERNAL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 syn keyword sdlStatement IF THEN FI FOR IMPORT MACRO MACRODEFINITION
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 syn keyword sdlStatement MACROID MOD NAMECLASS NODELAY NOT OPERATOR OR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 syn keyword sdlStatement PARENT PROVIDED REFERENCED REM
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 syn keyword sdlStatement SELECT SPELLING SUBSTRUCTURE XOR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 syn keyword sdlNewState STATE ENDSTATE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 syn keyword sdlInput INPUT START STOP RETURN NONE SAVE PRIORITY
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 syn keyword sdlConditional DECISION ENDDECISION JOIN
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn keyword sdlVirtual VIRTUAL REDEFINED FINALIZED ADDING INHERITS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 syn keyword sdlExported REMOTE EXPORTED EXPORT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 syn keyword sdlStatement ABSTRACT AGGREGATION ASSOCIATION BREAK CHOICE COMPOSITION
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 syn keyword sdlStatement CONTINUE ENDMETHOD ENDOBJECT ENDVALUE HANDLE METHOD OBJECT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 syn keyword sdlStatement ORDERED PRIVATE PROTECTED PUBLIC
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 syn keyword sdlException EXCEPTIONHANDLER ENDEXCEPTIONHANDLER ONEXCEPTION
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 syn keyword sdlException CATCH NEW RAISE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 " String and Character contstants
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 " Highlight special characters (those which have a backslash) differently
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 syn match sdlSpecial contained "\\\d\d\d\|\\."
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 syn region sdlString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 syn region sdlString start=+'+ skip=+''+ end=+'+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 " No, this doesn't happen, I just wanted to scare you. SDL really allows all
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 " these characters for identifiers; fortunately, keywords manage without them.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 " set iskeyword=@,48-57,_,192-214,216-246,248-255,-
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 syn region sdlComment start="/\*" end="\*/"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 syn region sdlComment start="comment" end=";"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 syn region sdlComment start="--" end="--\|$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 syn match sdlCommentError "\*/"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 syn keyword sdlOperator present
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 syn keyword sdlType integer real natural duration pid boolean time
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 syn keyword sdlType character charstring ia5string
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 syn keyword sdlType self now sender offspring
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 syn keyword sdlStructure asntype endasntype syntype endsyntype struct
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 if !exists("sdl_no_96")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 syn keyword sdlStructure newtype endnewtype
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 if exists("sdl_2000")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 syn keyword sdlStructure object endobject value endvalue
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 " The same in uppercase
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 syn keyword sdlStructure OBJECT ENDOBJECT VALUE ENDVALUE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 syn keyword sdlOperator PRESENT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 syn keyword sdlType INTEGER NATURAL DURATION PID BOOLEAN TIME
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 syn keyword sdlType CHARSTRING IA5STRING
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 syn keyword sdlType SELF NOW SENDER OFFSPRING
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 syn keyword sdlStructure ASNTYPE ENDASNTYPE SYNTYPE ENDSYNTYPE STRUCT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 " ASN.1 in SDL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 syn keyword sdlType SET OF BOOLEAN INTEGER REAL BIT OCTET
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 syn keyword sdlType SEQUENCE CHOICE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 syn keyword sdlType STRING OBJECT IDENTIFIER NULL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 syn sync ccomment sdlComment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 " Define the default highlighting.
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 3237
diff changeset
129 " Only when an item doesn't have highlighting yet
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 3237
diff changeset
130 command -nargs=+ Hi hi def <args>
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
132 hi def link sdlException Label
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
133 hi def link sdlConditional sdlStatement
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
134 hi def link sdlVirtual sdlStatement
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
135 hi def link sdlExported sdlFlag
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
136 hi def link sdlCommentError sdlError
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
137 hi def link sdlOperator Operator
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
138 hi def link sdlStructure sdlType
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 3237
diff changeset
139 Hi sdlStatement term=bold ctermfg=4 guifg=Blue
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 3237
diff changeset
140 Hi sdlFlag term=bold ctermfg=4 guifg=Blue gui=italic
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 3237
diff changeset
141 Hi sdlNewState term=italic ctermfg=2 guifg=Magenta gui=underline
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 3237
diff changeset
142 Hi sdlInput term=bold guifg=Red
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
143 hi def link sdlType Type
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
144 hi def link sdlString String
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
145 hi def link sdlComment Comment
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
146 hi def link sdlSpecial Special
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
147 hi def link sdlError Error
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 3237
diff changeset
149 delcommand Hi
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
151 let b:current_syntax = "sdl"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
152
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
153 " vim: ts=8