I keep a bunch of markdown-formatted text files on my iDisk. I use folding extensively in them, like this:
Some words{
* Text that is folded.
}
To the best of my knowledge, curly braces are the only way to fold in Markdown.
Sometimes I've been opening a file and seeing that the folding goes from the top brace to some random point *inside* the folded text, instead of to the closing brace or anything that could possibly be construed as a folding marker.
I'm pretty sure that this is because when I create the file with one TextMate on my iMac, edit it while away on my Macbook, and then open up the changed file again on my iMac later (all the syncing and such has happened in the meantime), somehow the metadata hasn't come along with it. So when I open the file, I have the data on one but the saved folding info for the old version, still. So the top brace folds to the line number of where the closing brace *used to be*.
Now, the way I use my iDisk (and the whole reason why I use it at all instead of Strongspace) is that it keeps a local copy on both my Macbook and my iMac, as well as on Apple's servers. So to TextMate, my iDisk probably looks local, and looks like it supports the extended attributes, but maybe that stuff is lost in transit through the network iDIsk. Either a ._something file is being skipped, or something is causing extended attributes to be lost.
Is anyone else familiar with this kind of folding weirdness? Can any one think of a solution besides turning extended attributes off? (For example, if it is indeed that extended attributes are being lost, is there a way to just force TextMate to always use ._something files? Presumably, this would sync fine.)
Thanks, j
Hi,
John Bergmayer <bergmayer@...> writes:
I keep a bunch of markdown-formatted text files on my iDisk. I use folding extensively in them, like this:
Some words{
- Text that is folded.
}
To the best of my knowledge, curly braces are the only way to fold in Markdown.
Yeah, that's because folding patterns aren't currently sophisticated enough to allow folding for markdown lists, sections (between headings), quotations, etc. Hopefully this will be different in TextMate 2.0. We'll have to see how Allan decides to make folding work. If it's based on scope, I hope we'll be able to fold all of the above.
If you want to have some other folding mechanism, you could make the folding pattern more complicated, but it would require mirrored beginning and ending markers of some sort.
Sometimes I've been opening a file and seeing that the folding goes from the top brace to some random point *inside* the folded text, instead of to the closing brace or anything that could possibly be construed as a folding marker.
I'm pretty sure that this is because when I create the file with one TextMate on my iMac, edit it while away on my Macbook, and then open up the changed file again on my iMac later (all the syncing and such has happened in the meantime), somehow the metadata hasn't come along with it. So when I open the file, I have the data on one but the saved folding info for the old version, still. So the top brace folds to the line number of where the closing brace *used to be*.
Yeah, that sounds about right. Somehow the extended attributes are getting mixed up somewhere in your process.
network iDIsk. Either a ._something file is being skipped, or something is causing extended attributes to be lost.
Exactly right.
Is anyone else familiar with this kind of folding weirdness? Can any one think of a solution besides turning extended attributes off? (For
No, it's a problem I've never encountered. And no, I can't think of other solutions, but that one should cause the foldings to just be ditched altogether, so I'm not sure it's a great solution.
example, if it is indeed that extended attributes are being lost, is there a way to just force TextMate to always use ._something files? Presumably, this would sync fine.)
Hmm, I don't think so. You can make it not ever use `._*` files, but I don't think you can force it to always use them.
-Jacob
PS: if there are no responses to this thread that adequately answer your questions, please ask again when Allan is back in 3 weeks, or file a ticket at macromates.com/ticket