If I'm repeatedly typing right-arrow to move the cursor position to the right, and the character I pass over happens to be a right-curly-brace that isn't balanced by a nearby left-curly-brace, TM seems to hang. It does recover, but it scares the pants off me every time it happens. m.
-- matt neuburg, phd = http://www.apeth.net/matt/ pantes anthropoi tou eidenai oregontai phusei Programming iOS 7! http://shop.oreilly.com/product/0636920031017.do iOS 7 Fundamentals! http://shop.oreilly.com/product/0636920032465.do RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html
On 7 Sep 2014, at 3:49, Matt Neuburg wrote:
If I'm repeatedly typing right-arrow to move the cursor position to the right, and the character I pass over happens to be a right-curly-brace that isn't balanced by a nearby left-curly-brace, TM seems to hang. It does recover, but it scares the pants off me every time it happens.
As mentioned previously¹, the function is slower than it needs to be because it always uses regular expressions for the search, improving it is on the to-do.
¹ http://lists.macromates.com/textmate/2014-April/037237.html
Wasn't trying to yank your chain, sorry; glad this is known. One thing that might help here is some intelligent scoping; there's no need to look back more than a dozen characters, because the scope in which the curly braces are meaningful comes to an end at that point. Not sure how TM could be told about that... m.
On Sep 7, 2014, at 2:44 AM, Allan Odgaard mailinglist@textmate.org wrote:
On 7 Sep 2014, at 3:49, Matt Neuburg wrote:
If I'm repeatedly typing right-arrow to move the cursor position to the right, and the character I pass over happens to be a right-curly-brace that isn't balanced by a nearby left-curly-brace, TM seems to hang. It does recover, but it scares the pants off me every time it happens.
As mentioned previously¹, the function is slower than it needs to be because it always uses regular expressions for the search, improving it is on the to-do.
¹ http://lists.macromates.com/textmate/2014-April/037237.html
-- matt neuburg, phd = http://www.apeth.net/matt/ pantes anthropoi tou eidenai oregontai phusei Programming iOS 7! http://shop.oreilly.com/product/0636920031017.do iOS 7 Fundamentals! http://shop.oreilly.com/product/0636920032465.do RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html
On 7 September 2014 16:45, Matt Neuburg matt@tidbits.com wrote:
the scope in which the curly braces are meaningful comes to an end at that point.
Hmm, I don't agree with that.
For one line of code perhaps, but its useful for nested blocks too. There are also cases where you have code collapsed, and are trying to balance the braces, in these cases there's just no sensible limit you can apply.
Perhaps there should be an option to disable the automatic highlighting, and then a key combo which triggers it manually for those cases when you need it?
On Sep 8, 2014, at 4:36 PM, Carpii UK carpii.uk@gmail.com wrote:
Hmm, I don't agree with that.
For one line of code perhaps, but its useful for nested blocks too.
Yes, but your are missing my point, which is that I'm not in that situation. My AsciiDoc document looks like this:
[Lots and lots and lots of text]`howdy}`
As we right-arrow over the right curly brace, there is no need to look back further than "howdy"; after that, we're not in the same curly-brace-matching scope anyway. I'm not saying that this heuristic is feasible everywhere - just that it's perfectly obvious to a human what the situation is at a glance ("of *course* it's unbalanced!"), so it seems unnecessary for TextMate to take so long to make up its mind. m.
-- matt neuburg, phd = http://www.apeth.net/matt/ pantes anthropoi tou eidenai oregontai phusei Programming iOS 7! http://shop.oreilly.com/product/0636920031017.do iOS 7 Fundamentals! http://shop.oreilly.com/product/0636920032465.do RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html