Skip to content

Commit 60c53a6

Browse files
committed
add keywords and spellcheck support
1 parent 9483f4b commit 60c53a6

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

syntax/tp.vim

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ if version < 600
1212
syntax clear
1313
endif
1414

15+
1516
" Sysvars
16-
syn match tpSysvar /\.\?\$[a-zA-Z0-9.]\+/
17+
syn match tpSysvar /\.\?\$[a-zA-Z0-9.]\+/
1718
hi def link tpSysvar Identifier
1819

1920
" Identifiers
@@ -78,7 +79,7 @@ syn region tpData start="TIMER_OVERFLOW\[" end="\]" contains=
7879
syn region tpData start="UALM\[" end="\]" contains=tpInteger,tpItemComment
7980
syn region tpData start="UFRAME\[" end="\]" contains=tpInteger,tpItemComment
8081
syn region tpData start="UTOOL\[" end="\]" contains=tpInteger,tpItemComment
81-
syn keyword tpData ERROR_PROG
82+
syn keyword tpData ERROR_PROG UFRAME_NUM UTOOL_NUM WAIT Offset Tool_Offset VOFFSET FOUND_POS
8283
hi def link tpData Type
8384

8485
" Item comment
@@ -134,14 +135,16 @@ syn match tpKeyword /COL GUARD ADJUST/
134135
syn match tpKeyword /\(LOCK\|UNLOCK\) \(PREG\|VREG\)/
135136
syn match tpKeyword /\(OFFSET\|TOOL_OFFSET\|VOFFSET\) CONDITION/
136137
syn match tpKeyword /SKIP CONDITION/
137-
syn keyword tpKeyword ABORT CALL CNT END FINE JMP JPOS LPOS MONITOR OVERRIDE PAUSE PAYLOAD POINT_LOGIC PULSE RESET RUN START STOP STOP_TRACKING TIMEOUT UFRAME_NUM UTOOL_NUM WAIT
138-
syn match tpKeyword /AP_LD/
138+
syn keyword tpKeyword ABORT CALL CNT END FINE JMP JPOS LPOS MONITOR OVERRIDE PAUSE PAYLOAD POINT_LOGIC PULSE RESET RUN START STOP STOP_TRACKING TIMEOUT
139+
syn match tpKeyword /AP_LD/
139140
syn match tpKeyword /CNT/
140141
syn match tpKeyword /RT_LD/
141142
hi def link tpKeyword Keyword
142143

143144
" Comments
144-
syn match tpComment /\(\s*\d*:\s*\)\@<=!.*/
145+
146+
syn match tpComment /\(\s*\d*:\s*\)\@<=!.*/ contains=@spell
147+
syn match tpComment /\(\s*\d*:\s*\)\@<=--eg:.*/ contains=@spell
145148
syn match tpRemark /\(\s*\d*:\s*\)\@<=\/\/.*/
146149
hi def link tpComment Comment
147150
hi def link tpRemark Comment

0 commit comments

Comments
 (0)