xref: /vim-8.2.3635/runtime/syntax/teraterm.vim (revision 20aac6c1)
1f9132810SBram Moolenaar" Vim syntax file
2f9132810SBram Moolenaar" Language:	Tera Term Language (TTL)
3*20aac6c1SBram Moolenaar"		Based on Tera Term Version 4.100
4f9132810SBram Moolenaar" Maintainer:	Ken Takata
5f9132810SBram Moolenaar" URL:		https://github.com/k-takata/vim-teraterm
6*20aac6c1SBram Moolenaar" Last Change:	2018-08-31
7f9132810SBram Moolenaar" Filenames:	*.ttl
8f9132810SBram Moolenaar" License:	VIM License
9f9132810SBram Moolenaar
10f9132810SBram Moolenaarif exists("b:current_syntax")
11f9132810SBram Moolenaar  finish
12f9132810SBram Moolenaarendif
13f9132810SBram Moolenaar
14f9132810SBram Moolenaarlet s:save_cpo = &cpo
15f9132810SBram Moolenaarset cpo&vim
16f9132810SBram Moolenaar
17f9132810SBram Moolenaarsyn case ignore
18f9132810SBram Moolenaar
19f9132810SBram Moolenaarsyn region ttlComment	start=";" end="$" contains=@Spell
20f9132810SBram Moolenaarsyn region ttlComment	start="/\*" end="\*/" contains=@Spell
21f9132810SBram Moolenaarsyn region ttlFirstComment	start="/\*" end="\*/" contained contains=@Spell
22f9132810SBram Moolenaar			\ nextgroup=ttlStatement,ttlFirstComment
23f9132810SBram Moolenaar
24f9132810SBram Moolenaarsyn match ttlCharacter	"#\%(\d\+\|\$\x\+\)\>"
25f9132810SBram Moolenaarsyn match ttlNumber	"\%(\<\d\+\|\$\x\+\)\>"
26f9132810SBram Moolenaarsyn match ttlString	"'[^']*'" contains=@Spell
27f9132810SBram Moolenaarsyn match ttlString	'"[^"]*"' contains=@Spell
28f9132810SBram Moolenaarsyn cluster ttlConstant contains=ttlCharacter,ttlNumber,ttlString
29f9132810SBram Moolenaar
30f9132810SBram Moolenaarsyn match ttlLabel	":\s*\w\{1,32}\>"
31f9132810SBram Moolenaar
32f9132810SBram Moolenaarsyn keyword ttlOperator	and or xor not
33f9132810SBram Moolenaar
34f9132810SBram Moolenaarsyn match ttlVar	"\<groupmatchstr\d\>"
35f9132810SBram Moolenaarsyn match ttlVar	"\<param\d\>"
367571d55fSBram Moolenaarsyn keyword ttlVar	inputstr matchstr paramcnt params result timeout mtimeout
37f9132810SBram Moolenaar
38f9132810SBram Moolenaar
39f9132810SBram Moolenaarsyn match ttlLine nextgroup=ttlStatement "^"
40f9132810SBram Moolenaarsyn match ttlStatement contained "\s*"
41f9132810SBram Moolenaar			\ nextgroup=ttlIf,ttlElseIf,ttlConditional,ttlRepeat,
42f9132810SBram Moolenaar			\ ttlFirstComment,ttlComment,ttlLabel,@ttlCommand
43f9132810SBram Moolenaar
44f9132810SBram Moolenaarsyn cluster ttlCommand contains=ttlControlCommand,ttlCommunicationCommand,
45f9132810SBram Moolenaar			\ ttlStringCommand,ttlFileCommand,ttlPasswordCommand,
46f9132810SBram Moolenaar			\ ttlMiscCommand
47f9132810SBram Moolenaar
48f9132810SBram Moolenaar
49f9132810SBram Moolenaarsyn keyword ttlIf contained nextgroup=ttlIfExpression if
50f9132810SBram Moolenaarsyn keyword ttlElseIf contained nextgroup=ttlElseIfExpression elseif
51f9132810SBram Moolenaar
52f9132810SBram Moolenaarsyn match ttlIfExpression contained "\s.*"
53f9132810SBram Moolenaar		\ contains=@ttlConstant,ttlVar,ttlOperator,ttlComment,ttlThen,
54f9132810SBram Moolenaar		\ @ttlCommand
55f9132810SBram Moolenaarsyn match ttlElseIfExpression contained "\s.*"
56f9132810SBram Moolenaar		\ contains=@ttlConstant,ttlVar,ttlOperator,ttlComment,ttlThen
57f9132810SBram Moolenaar
58f9132810SBram Moolenaarsyn keyword ttlThen contained then
59f9132810SBram Moolenaarsyn keyword ttlConditional contained else endif
60f9132810SBram Moolenaar
61f9132810SBram Moolenaarsyn keyword ttlRepeat contained for next until enduntil while endwhile
62f9132810SBram Moolenaarsyn match ttlRepeat contained
63f9132810SBram Moolenaar			\ "\<\%(do\|loop\)\%(\s\+\%(while\|until\)\)\?\>"
64f9132810SBram Moolenaarsyn keyword ttlControlCommand contained
65f9132810SBram Moolenaar			\ break call continue end execcmnd exit goto include
66f9132810SBram Moolenaar			\ mpause pause return
67f9132810SBram Moolenaar
68f9132810SBram Moolenaar
69f9132810SBram Moolenaarsyn keyword ttlCommunicationCommand contained
70f9132810SBram Moolenaar			\ bplusrecv bplussend callmenu changedir clearscreen
71f9132810SBram Moolenaar			\ closett connect cygconnect disconnect dispstr
72f9132810SBram Moolenaar			\ enablekeyb flushrecv gethostname getmodemstatus
73f9132810SBram Moolenaar			\ gettitle kmtfinish kmtget kmtrecv kmtsend loadkeymap
74f9132810SBram Moolenaar			\ logautoclosemode logclose loginfo logopen logpause
75f9132810SBram Moolenaar			\ logrotate logstart logwrite quickvanrecv
76f9132810SBram Moolenaar			\ quickvansend recvln restoresetup scprecv scpsend
77f9132810SBram Moolenaar			\ send sendbreak sendbroadcast sendfile sendkcode
78*20aac6c1SBram Moolenaar			\ sendln sendlnbroadcast sendlnmulticast sendmulticast
79*20aac6c1SBram Moolenaar			\ setbaud setdebug setdtr setecho setflowctrl
80*20aac6c1SBram Moolenaar			\ setmulticastname setrts setspeed setsync settitle
81*20aac6c1SBram Moolenaar			\ showtt testlink unlink wait wait4all waitevent
82*20aac6c1SBram Moolenaar			\ waitln waitn waitrecv waitregex xmodemrecv
83*20aac6c1SBram Moolenaar			\ xmodemsend ymodemrecv ymodemsend zmodemrecv
84*20aac6c1SBram Moolenaar			\ zmodemsend
85f9132810SBram Moolenaarsyn keyword ttlStringCommand contained
86f9132810SBram Moolenaar			\ code2str expandenv int2str regexoption sprintf
87f9132810SBram Moolenaar			\ sprintf2 str2code str2int strcompare strconcat
88f9132810SBram Moolenaar			\ strcopy strinsert strjoin strlen strmatch strremove
89f9132810SBram Moolenaar			\ strreplace strscan strspecial strsplit strtrim
90f9132810SBram Moolenaar			\ tolower toupper
91f9132810SBram Moolenaarsyn keyword ttlFileCommand contained
92f9132810SBram Moolenaar			\ basename dirname fileclose fileconcat filecopy
93f9132810SBram Moolenaar			\ filecreate filedelete filelock filemarkptr fileopen
94f9132810SBram Moolenaar			\ filereadln fileread filerename filesearch fileseek
95f9132810SBram Moolenaar			\ fileseekback filestat filestrseek filestrseek2
96f9132810SBram Moolenaar			\ filetruncate fileunlock filewrite filewriteln
97f9132810SBram Moolenaar			\ findfirst findnext findclose foldercreate
98f9132810SBram Moolenaar			\ folderdelete foldersearch getdir getfileattr makepath
99f9132810SBram Moolenaar			\ setdir setfileattr
100f9132810SBram Moolenaarsyn keyword ttlPasswordCommand contained
101f9132810SBram Moolenaar			\ delpassword getpassword ispassword passwordbox
102f9132810SBram Moolenaar			\ setpassword
103f9132810SBram Moolenaarsyn keyword ttlMiscCommand contained
104f9132810SBram Moolenaar			\ beep bringupbox checksum8 checksum8file checksum16
105f9132810SBram Moolenaar			\ checksum16file checksum32 checksum32file closesbox
106f9132810SBram Moolenaar			\ clipb2var crc16 crc16file crc32 crc32file exec
107f9132810SBram Moolenaar			\ dirnamebox filenamebox getdate getenv getipv4addr
108f9132810SBram Moolenaar			\ getipv6addr getspecialfolder gettime getttdir getver
109f9132810SBram Moolenaar			\ ifdefined inputbox intdim listbox messagebox random
110f9132810SBram Moolenaar			\ rotateleft rotateright setdate setdlgpos setenv
111f9132810SBram Moolenaar			\ setexitcode settime show statusbox strdim uptime
112f9132810SBram Moolenaar			\ var2clipb yesnobox
113f9132810SBram Moolenaar
114f9132810SBram Moolenaar
115f9132810SBram Moolenaarhi def link ttlCharacter Character
116f9132810SBram Moolenaarhi def link ttlNumber Number
117f9132810SBram Moolenaarhi def link ttlComment Comment
118f9132810SBram Moolenaarhi def link ttlFirstComment Comment
119f9132810SBram Moolenaarhi def link ttlString String
120f9132810SBram Moolenaarhi def link ttlLabel Label
121f9132810SBram Moolenaarhi def link ttlIf Conditional
122f9132810SBram Moolenaarhi def link ttlElseIf Conditional
123f9132810SBram Moolenaarhi def link ttlThen Conditional
124f9132810SBram Moolenaarhi def link ttlConditional Conditional
125f9132810SBram Moolenaarhi def link ttlRepeat Repeat
126f9132810SBram Moolenaarhi def link ttlControlCommand Keyword
127f9132810SBram Moolenaarhi def link ttlVar Identifier
128f9132810SBram Moolenaarhi def link ttlOperator Operator
129f9132810SBram Moolenaarhi def link ttlCommunicationCommand Keyword
130f9132810SBram Moolenaarhi def link ttlStringCommand Keyword
131f9132810SBram Moolenaarhi def link ttlFileCommand Keyword
132f9132810SBram Moolenaarhi def link ttlPasswordCommand Keyword
133f9132810SBram Moolenaarhi def link ttlMiscCommand Keyword
134f9132810SBram Moolenaar
135f9132810SBram Moolenaarlet b:current_syntax = "teraterm"
136f9132810SBram Moolenaar
137f9132810SBram Moolenaarlet &cpo = s:save_cpo
138f9132810SBram Moolenaarunlet s:save_cpo
139f9132810SBram Moolenaar
140f9132810SBram Moolenaar" vim: ts=8 sw=2 sts=2
141