In my new AsciiDoc bundle, I've still got a major problem which was one of the reasons I wrote my own bundle - in other words, my attempt to solve this problem by rewriting this bundle from scratch didn't work.
The problem is manifested in various guises, but one of the main ways is that when I scroll up in a long document, the window hesitates for about a second before showing the new window-full of text.
I have come to suspect that this is because of indented soft wrapping. I do not have any indented soft wrapping, and I do not see any indented soft wrapping, and I do not *want* any indented soft wrapping, but various indications lead me to believe that other bundles are trying to impose it upon me in some contexts.
I could try to find all of these contexts and give their scopes different names, but what I would *really* like to do is shelter my main scope (text.asciidoc) from all imposed indented soft wrapping. In other words, I just want to turn this feature OFF. I believe that this will greatly assist the text window in rendering.
How do I do that? I see how to specify what indented soft wrapping *is* for some scope, but is there a setting that just says NO to all indented soft wrapping? Can I say indentedSoftWrap = :false?
(Note that I want to keep soft wrapping; this is a marked-up text bundle, so it has paragraphs that need to soft wrap. But I want to relieve the layout engine of _all_ **indented** soft wrapping, as I believe this is causing the layout engine to suffer greatly.)
Thanks - m.
PS We were just starting to talk about this in an earlier thread when I interrupted the flow, by talking about the problem of a GUI to handle things like this. But now I'm sorry I did that, because I never got to hear the answer. :)
-- 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 26 Feb 2014, at 0:56, Matt Neuburg wrote:
The problem is manifested in various guises, but one of the main ways is that when I scroll up in a long document, the window hesitates for about a second before showing the new window-full of text.
I believe you are seeing an issue with TextMate 2.
If you have long paragraphs of (soft wrapped) text, you scroll up, and the text hasn’t been displayed before, TM’s lazy layout engine results in a suboptimal user experience, in that it will expand the single line scrolled into the view, to the full paragraph with all the text (enlarging the height of the buffer).
On Feb 26, 2014, at 9:55 PM, Allan Odgaard mailinglist@textmate.org wrote:
On 26 Feb 2014, at 0:56, Matt Neuburg wrote:
The problem is manifested in various guises, but one of the main ways is that when I scroll up in a long document, the window hesitates for about a second before showing the new window-full of text.
I believe you are seeing an issue with TextMate 2.
If you have long paragraphs of (soft wrapped) text, you scroll up, and the text hasn’t been displayed before, TM’s lazy layout engine results in a suboptimal user experience, in that it will expand the single line scrolled into the view, to the full paragraph with all the text (enlarging the height of the buffer).
Allan - It's great that you know about this (and that you see it as an issue). But I still have two questions about this:
(1) One question is whether I can do anything about this effect. I've tried to avoid things that I thought might contribute to it: I'm using all one font and size and it is a monospaced font, and I'm trying to avoid indented soft wrap. I cannot actually avoid soft wrap itself, any more than Markdown would be able to. Is there any more I can do? Basically I'm trying to get TextMate 2 to behave like TextMate 1, i.e. to make the scrolling experience fast and without this "blink" effect.
(By the way, I think there may be another side effect of this lazy layout: the TOC menu does not always work properly. Sometimes I choose an item and the chosen item does not scroll into view. I think this is because the layout engine does not know where that line is, in terms of the whole height of the document.)
(2) I _still_ need a way to shelter myself from indentedSoftWrap! I can see that for some scopes, e.g. double-slashed comments, other bundles are fighting me: they are trying to do indented soft wrap, while I am trying to prevent it. I believe this is making TextMate unhappy. :) Apart from turning off this feature in each of the other bundles, which I would prefer not to do, what can I do about this? In other words, how can I shelter myself, within my bundle, from the attempt of other bundles to impose indentedSoftWrap upon me?
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 27 Feb 2014, at 23:33, Matt Neuburg wrote:
(1) One question is whether I can do anything about this effect […]
No, TextMate’s behavior here is pretty deterministic ;)
(2) I _still_ need a way to shelter myself from indentedSoftWrap! I can see that for some scopes, e.g. double-slashed comments, other bundles are fighting me: they are trying to do indented soft wrap, while I am trying to prevent it. I believe this is making TextMate unhappy. :) Apart from turning off this feature in each of the other bundles, which I would prefer not to do, what can I do about this? In other words, how can I shelter myself, within my bundle, from the attempt of other bundles to impose indentedSoftWrap upon me?
This is twofold, as a bundle creator you should not shelter your bundle from external settings. The user may have good reason to inject settings into your bundle’s scopes.
As an end-user, you can disable the indented soft wrap settings that we have in the default bundles. This needs to be done once, and that’s it (see earlier thread). When we review bundles, we ensure that all items are scoped so that they are only active for the bundle’s language, unless of course it’s meant to be global, e.g. the recent Merge Markers bundle.
On Feb 28, 2014, at 10:28 PM, Allan Odgaard mailinglist@textmate.org wrote:
When we review bundles, we ensure that all items are scoped so that they are only active for the bundle’s language
I don't see how you make that out. The Source bundle's double-slashed comment indentedSoftWrap is scoped to comment.line.double-slash; it does not limit itself to source scope. That's the problem.
Similarly, the Text bundle's numbered list indentedSoftWrap is scoped to markup.list.numbered; it does not ask me whether I want _my_ numbered lists to use this setting, it just does it to me.
Thus, for example, if I want to avoid this indented soft wrapping for comments, I can't call my scope comment.line.double-slash.asciidoc. What I'm saying is, okay, then if that is your Final Answer, okay, I won't call my scope that - but asciidoc _does_ have single-line double-slashed comments, so it would be nice if I _could_ use this name but could use my settings to give different instructions for indentedSoftWrap in the comment.line.double-slash.asciidoc scope, namely "none".
Similarly for numbered lists.
That doesn't seem an unreasonable expectation.
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 2 Mar 2014, at 0:15, Matt Neuburg wrote:
On Feb 28, 2014, at 10:28 PM, Allan Odgaard mailinglist@textmate.org wrote:
When we review bundles, we ensure that all items are scoped so that they are only active for the bundle’s language
I don't see how you make that out. The Source bundle's double-slashed comment indentedSoftWrap is scoped to comment.line.double-slash; it does not limit itself to source scope. That's the problem.
Similarly, the Text bundle's numbered list indentedSoftWrap is scoped to markup.list.numbered; it does not ask me whether I want _my_ numbered lists to use this setting, it just does it to me.
The Source and Text bundles are default bundles that have general settings related to source and text, they are not (third party) language specific bundles.
Thus, for example, if I want to avoid this indented soft wrapping for comments, I can't call my scope comment.line.double-slash.asciidoc […]
No, you should use that scope.
If you as a user do not want soft wrapped comments, you should (with the current state of things) disable the settings in the Source bundle.
But you, as a bundle author, should not craft your scopes to avoid (default) settings.
On Mar 1, 2014, at 9:33 AM, Allan Odgaard mailinglist@textmate.org wrote:
If you as a user do not want soft wrapped comments, you should (with the current state of things) disable the settings in the Source bundle.
I do want soft wrapped comments. But I don't want soft *indented* comments (indentedSoftWrap).
It seems to me that I should be able to determine this. Whose bundle is it anyway?
Plus, as I said before, I believe that the soft indentation is slowing down TextMate's rendering of the page.
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 2 Mar 2014, at 1:54, Matt Neuburg wrote:
On Mar 1, 2014, at 9:33 AM, Allan Odgaard mailinglist@textmate.org wrote:
If you as a user do not want soft wrapped comments, you should (with the current state of things) disable the settings in the Source bundle.
I do want soft wrapped comments. But I don't want soft *indented* comments (indentedSoftWrap).
Right, I was referring to the indented soft wrap of comments.
It seems to me that I should be able to determine this. Whose bundle is it anyway?
And you are. Were you unsuccesful at locally disabling indented soft wrap for comments?
Plus, as I said before, I believe that the soft indentation is slowing down TextMate's rendering of the page.
And as I said, there is nothing you can do about the current performance/behavior (without hacking on the code).