Sublime Forum

Matching braces issue

#1

Suppose I have a Tcl script file with this content:
proc Test {args} {
set test {{1 -1 0}}
}

When I place the curser behind the last brace and press CTRL+M, the cursor should jump to the matching opening brace. This does not happen. Is this an issue with the syntax file definition for Tcl or is it a core issue of Sublime?

Thanks
Alex

0 Likes

#2

If i’m understanding you correctly, this seems to work for me out of the box on a stock Sublime with no extra packages of any kind installed; no matter what brace I put the cursor on, it jumps to the appropriate match.

When you place the cursor by a brace, does Sublime correctly underline the matching brace?

0 Likes

#3

Thanks. I tested without Tcl syntax activated, and it works. Only if the Tcl syntax is active, the opening brace is not regognized. And yes, the underline is also not there.

0 Likes

#4

Perhaps you have a third party package that’s providing a different TCL syntax?

I believe that the brace matching is something that’s done in core and isn’t influenced by the syntax in use though, based on various requests I’ve seen to add other items to the list of things that match.

Based on how it seems to work for things not TCL, it may be worth checking to see if you have any syntax specific settings for TCL files that perhaps have the match_brackets option disabled.

0 Likes

#5

I’ve searched for *.sublime-syntax on my whole computer. Can’t find any.
So it’s an issue in the Core?
The problem is not general. It happens due to the second line in
proc Test {args} {
set test {{1 -1 0}}
}
The double braces are causing the problem.

0 Likes

#6

Ahh indeed so. It worked for me earlier, but I just realized that I accidentally tested it in build 3155, where it works just fine. In the latest build the {1 -1 0} seems to be considered a string which may be messing it up.

It may be worth raising an issue in the packages repo if there isn’t already one there.

You can’t find the syntax because it’s not a loose file, it’s a part of a sublime-package file.

0 Likes

#7

Okay, I did:

0 Likes