xref: /vim-8.2.3635/runtime/syntax/cterm.vim (revision 89a9c159)
1" Vim syntax file
2" Language:	Century Term Command Script
3" Maintainer:	Sean M. McKee <[email protected]>
4" Last Change:	2002 Apr 13
5" Version Info: @(#)cterm.vim	1.7	97/12/15 09:23:14
6
7" quit when a syntax file was already loaded
8if exists("b:current_syntax")
9  finish
10endif
11
12syn case ignore
13
14"FUNCTIONS
15syn keyword ctermFunction	abort addcr addlf answer at attr batch baud
16syn keyword ctermFunction	break call capture cd cdelay charset cls color
17syn keyword ctermFunction	combase config commect copy cread
18syn keyword ctermFunction	creadint devprefix dialer dialog dimint
19syn keyword ctermFunction	dimlog dimstr display dtimeout dwait edit
20syn keyword ctermFunction	editor emulate erase escloop fcreate
21syn keyword ctermFunction	fflush fillchar flags flush fopen fread
22syn keyword ctermFunction	freadln fseek fwrite fwriteln get hangup
23syn keyword ctermFunction	help hiwait htime ignore init itime
24syn keyword ctermFunction	keyboard lchar ldelay learn lockfile
25syn keyword ctermFunction	locktime log login logout lowait
26syn keyword ctermFunction	lsend ltime memlist menu mkdir mode
27syn keyword ctermFunction	modem netdialog netport noerror pages parity
28syn keyword ctermFunction	pause portlist printer protocol quit rcv
29syn keyword ctermFunction	read readint readn redial release
30syn keyword ctermFunction	remote rename restart retries return
31syn keyword ctermFunction	rmdir rtime run runx scrollback send
32syn keyword ctermFunction	session set setcap setcolor setkey
33syn keyword ctermFunction	setsym setvar startserver status
34syn keyword ctermFunction	stime stopbits stopserver tdelay
35syn keyword ctermFunction	terminal time trans type usend version
36syn keyword ctermFunction	vi vidblink vidcard vidout vidunder wait
37syn keyword ctermFunction	wildsize wclose wopen wordlen wru wruchar
38syn keyword ctermFunction	xfer xmit xprot
39syn match ctermFunction		"?"
40"syn keyword ctermFunction	comment remark
41
42"END FUNCTIONS
43"INTEGER FUNCTIONS
44syn keyword ctermIntFunction	asc atod eval filedate filemode filesize ftell
45syn keyword ctermIntFunction	len termbits opsys pos sum time val mdmstat
46"END INTEGER FUNCTIONS
47
48"STRING FUNCTIONS
49syn keyword ctermStrFunction	cdate ctime chr chrdy chrin comin getenv
50syn keyword ctermStrFunction	gethomedir left midstr right str tolower
51syn keyword ctermStrFunction	toupper uniq comst exists feof hascolor
52
53"END STRING FUNCTIONS
54
55"PREDEFINED TERM VARIABLES R/W
56syn keyword ctermPreVarRW	f _escloop _filename _kermiteol _obufsiz
57syn keyword ctermPreVarRW	_port _rcvsync _cbaud _reval _turnchar
58syn keyword ctermPreVarRW	_txblksiz _txwindow _vmin _vtime _cparity
59syn keyword ctermPreVarRW	_cnumber false t true _cwordlen _cstopbits
60syn keyword ctermPreVarRW	_cmode _cemulate _cxprot _clogin _clogout
61syn keyword ctermPreVarRW	_cstartsrv _cstopsrv _ccmdfile _cwru
62syn keyword ctermPreVarRW	_cprotocol _captfile _cremark _combufsiz
63syn keyword ctermPreVarRW	logfile
64"END PREDEFINED TERM VARIABLES R/W
65
66"PREDEFINED TERM VARIABLES R/O
67syn keyword ctermPreVarRO	_1 _2 _3 _4 _5 _6 _7 _8 _9 _cursess
68syn keyword ctermPreVarRO	_lockfile _baud _errno _retval _sernum
69syn keyword ctermPreVarRO	_timeout _row _col _version
70"END PREDEFINED TERM VARIABLES R/O
71
72syn keyword ctermOperator not mod eq ne gt le lt ge xor and or shr not shl
73
74"SYMBOLS
75syn match   CtermSymbols	 "|"
76"syn keyword ctermOperators + - * / % = != > < >= <= & | ^ ! << >>
77"END SYMBOLS
78
79"STATEMENT
80syn keyword ctermStatement	off
81syn keyword ctermStatement	disk overwrite append spool none
82syn keyword ctermStatement	echo view wrap
83"END STATEMENT
84
85"TYPE
86"syn keyword ctermType
87"END TYPE
88
89"USERLIB FUNCTIONS
90"syn keyword ctermLibFunc
91"END USERLIB FUNCTIONS
92
93"LABEL
94syn keyword ctermLabel    case default
95"END LABEL
96
97"CONDITIONAL
98syn keyword ctermConditional on endon
99syn keyword ctermConditional proc endproc
100syn keyword ctermConditional for in do endfor
101syn keyword ctermConditional if else elseif endif iferror
102syn keyword ctermConditional switch endswitch
103syn keyword ctermConditional repeat until
104"END CONDITIONAL
105
106"REPEAT
107syn keyword ctermRepeat    while
108"END REPEAT
109
110" Function arguments (eg $1 $2 $3)
111syn match  ctermFuncArg	"\$[1-9]"
112
113syn keyword ctermTodo contained TODO
114
115syn match  ctermNumber		"\<\d\+\(u\=l\=\|lu\|f\)\>"
116"floating point number, with dot, optional exponent
117syn match  ctermNumber		"\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>"
118"floating point number, starting with a dot, optional exponent
119syn match  ctermNumber		"\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>"
120"floating point number, without dot, with exponent
121syn match  ctermNumber		"\<\d\+e[-+]\=\d\+[fl]\=\>"
122"hex number
123syn match  ctermNumber		"0x[0-9a-f]\+\(u\=l\=\|lu\)\>"
124
125syn match  ctermComment		"![^=].*$" contains=ctermTodo
126syn match  ctermComment		"!$"
127syn match  ctermComment		"\*.*$" contains=ctermTodo
128syn region  ctermComment	start="comment" end="$" contains=ctermTodo
129syn region  ctermComment	start="remark" end="$" contains=ctermTodo
130
131syn region ctermVar		start="\$("  end=")"
132
133" String and Character contstants
134" Highlight special characters (those which have a backslash) differently
135syn match   ctermSpecial		contained "\\\d\d\d\|\\."
136syn match   ctermSpecial		contained "\^."
137syn region  ctermString			start=+"+  skip=+\\\\\|\\"+  end=+"+  contains=ctermSpecial,ctermVar,ctermSymbols
138syn match   ctermCharacter		"'[^\\]'"
139syn match   ctermSpecialCharacter	"'\\.'"
140
141" Define the default highlighting.
142" Only when an item doesn't have highlighting yet
143
144hi def link ctermStatement		Statement
145hi def link ctermFunction		Statement
146hi def link ctermStrFunction	Statement
147hi def link ctermIntFunction	Statement
148hi def link ctermLabel		Statement
149hi def link ctermConditional	Statement
150hi def link ctermRepeat		Statement
151hi def link ctermLibFunc		UserDefFunc
152hi def link ctermType		Type
153hi def link ctermFuncArg		PreCondit
154
155hi def link ctermPreVarRO		PreCondit
156hi def link ctermPreVarRW		PreConditBold
157hi def link ctermVar		Type
158
159hi def link ctermComment		Comment
160
161hi def link ctermCharacter		SpecialChar
162hi def link ctermSpecial		Special
163hi def link ctermSpecialCharacter	SpecialChar
164hi def link ctermSymbols		Special
165hi def link ctermString		String
166hi def link ctermTodo		Todo
167hi def link ctermOperator		Statement
168hi def link ctermNumber		Number
169
170" redefine the colors
171"hi PreConditBold	term=bold ctermfg=1 cterm=bold guifg=Purple gui=bold
172"hi Special	term=bold ctermfg=6 guifg=SlateBlue gui=underline
173
174
175let b:current_syntax = "cterm"
176
177" vim: ts=8
178