Steps:
-
Syntax = Tcl;
-
Color theme = jEdit;
-
Example 1: code with incorrectly highlighted words
33: proc ::_buttontoggleHandler {cbox args } {
34: # Invert value only by events with tag=“invoke”
35: if {$args eq “invoke”} {$cbox invert };
36: $cbox {*}$args;
37: }; -
Example 2: code with correctly highlighted words
33: proc ::_buttontoggleHandler { cbox args } {
34: # Invert value only by events with tag=“invoke”
35: if {$args eq “invoke”} { $cbox invert };
36: $cbox {*}$args;
37: };
In Example 1, words “$cbox invert” on the line 35, highlights as an value of variable (foreground=pink).
In Example 2, words “$cbox invert” on the line 35, highlights as a normal block of code.
The only difference between examples - in line 35, beetwen the symbol “{” and words “$cbox invert”.
If block of code spaced between the symbol, which indicate the start of new block of code, then Sublime-Text highlights this block of code as block of code - this is correct.
If block of code has no space between the symbol, which indicate the start of new block of code, then Sumblime-Text highlight this block of code as a value of variable - this is incorrect.