Home Download Buy Blog Forum Support

Can't find matching bracket/brace

Can't find matching bracket/brace

Postby vik2323 on Mon Jun 24, 2013 5:06 pm

I've found that for large code-blocks (200r ows say) sublime text can't figure out what opening bracket the closing bracket matches up with. For this functionality only I have to use notepad++ and then return to ST for all else. Is there a way to fix this?
vik2323
 
Posts: 3
Joined: Mon Jun 24, 2013 5:03 pm

Re: Can't find matching bracket/brace

Postby layne on Mon Jun 24, 2013 8:19 pm

Did you try to use the Package BracketHighlighter?
Perhaps this package doesn't have the same issue.
// my Blog //
layne
 
Posts: 39
Joined: Tue Jan 04, 2011 3:00 pm
Location: NRW // GER

Re: Can't find matching bracket/brace

Postby vik2323 on Tue Jun 25, 2013 12:02 am

That's an awesome package! Just tried it out and it does very well with most of my code but the large structures get lost... on the very left it says ? next to the line number indicating that it can't find the matching bracket. I'm not sure how notepad++ manages to do it. Unless there's something wrong with the code (but it has always executed correctly for me).
vik2323
 
Posts: 3
Joined: Mon Jun 24, 2013 5:03 pm

Re: Can't find matching bracket/brace

Postby vik2323 on Tue Jun 25, 2013 12:17 am

Just confirmed it's a strange sublime text issue. At least for me when I try this dummy php code:

if ($a==$b) {
$c = "sadfasdfasdfasdfasdf";
... repeat that line 134 times
}

then it loses the connection between the the two brackets. Any lower number of lines in the if statement works.
vik2323
 
Posts: 3
Joined: Mon Jun 24, 2013 5:03 pm

Re: Can't find matching bracket/brace

Postby facelessuser on Tue Jun 25, 2013 2:23 am

BracketHighlighter purposely stops trying to find brackets after a certain threshold. The threshold is in the settings file. This is to ensure performances remains tolerable while you are typing and moving your cursor around. You can increase the threshold if you like. I also provide a command in brackethighlighter to do a on-demand search that will not use the threshold and search to the end of the file. There are also commands to jump between the brackets that also do not use the threshold. You can bind all of these commands to shortcuts if you like. I provide an example shortcut file to show you how.
facelessuser
 
Posts: 1567
Joined: Tue Apr 05, 2011 7:38 pm

Re: Can't find matching bracket/brace

Postby qgates on Tue Jun 25, 2013 4:03 am

Would be nice to be able to configure this, though the value of visual highlighting is somewhat lost across this many lines. Ctrl+M (jump to matching bracket) still works though, across any number of lines.
qgates
 
Posts: 205
Joined: Mon Nov 05, 2012 4:33 pm


Return to Technical Support

Who is online

Users browsing this forum: No registered users and 22 guests