I'd like to be able to fold text in plain text files. I often use a plain text file to plan database tables and columns, and to write pseudo code. Ideally I'd like to be able to fold the text so that I can more easily see my headings - like an outliner, yes, that's it.
I've had a look at the bundles available at svn.textmate.org/trunk/ Bundles, and have found the Outlines.tmbundle but doesn't appear to do what I want. Any suggestions?
-----Original Message----- From: Justin Catterall Sent: Tuesday, July 13, 2010 8:03 AM Subject: [TxMt] Folding in plain text?
I'd like to be able to fold text in plain text files. I often use a plain text file to plan database tables and columns, and to write pseudo code. Ideally I'd like to be able to fold the text so that I can more easily see my headings - like an outliner, yes, that's it.
--------------
Well, you can always select some arbitrary text and press F1. The nice thing about that is once you've done that, the folding markers tend to stick around and you can re-fold the same bit of text without the selection.
Beyond that, you'll have to define a language grammar so that folding start and stop markers can be declared.
+dru
On 13 Jul 2010, at 17:24, Dru Kepple wrote:
-----Original Message----- From: Justin Catterall Sent: Tuesday, July 13, 2010 8:03 AM Subject: [TxMt] Folding in plain text?
I'd like to be able to fold text in plain text files. I often use a plain text file to plan database tables and columns, and to write pseudo code. Ideally I'd like to be able to fold the text so that I can more easily see my headings - like an outliner, yes, that's it.
Well, you can always select some arbitrary text and press F1. The nice thing about that is once you've done that, the folding markers tend to stick around and you can re-fold the same bit of text without the selection.
Beyond that, you'll have to define a language grammar so that folding start and stop markers can be declared.
Thank you Dru, I wasn't aware of that, I've only ever used F1 within a code block and have it fold that block. I didn't know you could set arbitrary fold locations with a selection. Thanks for mentioning it.
Defining language grammar would probably be a very educational exercise, maybe I'll look at the existing bundles and have a go some time, but this solution solves the problem for now.
On 13 Jul 2010, at 17:27, Dan O'D wrote:
Justin Catterall <100621.1@...> writes:
Ideally I'd like to be able to fold the text so that I can more easily see my headings - like an outliner, yes, that's it.
Hi Justin, I'm probably missing something but won't
View->Soft Wrap
do what you're after?
Thank you for the suggestion Dan, but folding is different, when coding it hides code between symbols like { and } so that I see just the expression leading to the code block, or name of the sub-routine. I would like to be able to do that with plain text... and from what Dru says it seems that I can, I just missed how to.
question for you all - I spent some time customizing the Blackboard theme to my liking and now use it frequently. however today I accidentally replaced it with the original Blackboard theme and now I cannot get it to load my custom version in the TM prefs panel I had renamed my BB theme 'My Blackboard' but nonetheless, when I accidentally overwrote it replaced my modified BB with the normal BB theme and 'My Blackboard' is no longer with us!
'but wait! all is not lost!' I said to myself - for of course I keep a backup of everything and I'll just delete Blackboard and reimport my own. but no joy. no matter what I try to do I cannot get my modified version to reload. I have tried renaming the new BB theme in the Finder, and replacing the name here:
<key>author</key> <string>Domenico Carbotta</string> <key>name</key> <string>Blackboard</string> <key>settings</key>
but when I reload the Theme file but no matter what I do it still reads it as 'Blackboard'.
even stranger - I when I opened the BB theme sitting in my Textmate.app package *it is the modified version - my version*! I checked it against my virgin copy and my backed up modified copy. so how can it still not be showing up as my modified version?!? I even tried logging out and back in again - but no dice.
so how can I be finding the original BB theme when the *modified* one is the one in the Themes folder inside TM??
and one more thing I noticed - even after I would delete the theme in my prefs panel and quit TM - when I would look inside the TM.app package afterwards... it was still there!
anyway - I've tried everything I can think of and now I would like some help! I wouldn't care so much except for two reasons: 1) I use this theme *a lot* and I like it the way I had it. 2) apparently simple problems I can't solve drive me crazy!
thanks. bennett
On 13 Jul 2010, at 18:41, plastichairdoo wrote:
[...] no matter what I try to do I cannot get my modified version to reload. I have tried renaming the new BB theme in the Finder, and replacing the name here: [...] so how can I be finding the original BB theme when the *modified* one is the one in the Themes folder inside TM??
The name of a theme is just a display name, changing that does not change the theme’s unique identifier — this is the ‘uuid’ in the property list (the .tmTheme file you edited).
If you edit your modified theme to have a new UUID then TextMate will see this as a different theme. You can generate such UUID via the ‘uuidgen’ shell command (Terminal).
and one more thing I noticed - even after I would delete the theme in my prefs panel and quit TM - when I would look inside the TM.app package afterwards... it was still there!
Deleting default items does not delete them inside TextMate.app for three reasons: 1) the user running TextMate may not have write access to these files, 2) after updating TextMate the entire TextMate.app is replaced so all deleted items would be restored, and 3) other users on the same system may not want the items deleted.
So when you delete default items it stores a list of which items that should be treated as deleted in ~/Library/Preferences/ com.macromates.textmate.plist (accessible via the ‘defaults’ shell command).