On 07/08/2005, at 15.24, Jeff Powell wrote:
[ I have cc'ed the mailing list since the info provided may be useful to others as well ]
How then do I take this glossary from BBEdit and copy it over to the TextMate drawer.
I'm not familiar with BBEdit's glossary functionality, but I downloaded some example glossaries and made a perl script which converts these to TextMate snippets (placing them in a bundle).
You run it with the folder containing a set of glossary items as argument. It will then create a tmbundle named after this folder, containing the items in the folder (as snippets). It removes #indent#, converts the #placeholderstart/end# to TM-notation for placeholders, does the proper escapes, and saves this as a property list (the format used for TM snippets) in the created bundle.
It uses the first word of the filename (in lowercase) as the tab- trigger. And you can supply a scope to be used for the script by using -s <scope> as first argument.
So for example I downloaded Marc's Bourne Shell Glossary. After mounting the disk image I ran this command from Terminal:
./glossary_to_snippet.perl -s source.shell '/Volumes/Bourne Shell Glossary.sh 1.0/Bourne Shell Glossary.sh'
Then (re)start TextMate, and there's a new bundle named “Bourne Shell Glossary” which contain the snippets.
This (TextMate) bundle is placed in ~/Library/Application Support/ TextMate/Bundles -- from Finder you'll need to use Show Package Contents to inspect the bundle, but you can drag it to TextMate to have a look at the contents.
I hope this provides you with enough details to convert your glossaries. If you're not familiar with what the scope is, I recommend this blog posting [1].
Kind regards Allan
[1] http://macromates.com/blog/archives/2005/07/06/introduction-to- scopes/