[TxMt] Setting default language for new documents

El Cuco elcucopr at gmail.com
Wed Feb 8 13:22:54 UTC 2006


Thanks, it worked as described.  Is there a chance that this could be added
as an option in a future release?

Thanks.

On 2/7/06, Allan Odgaard <throw-away-1 at macromates.com> wrote:
>
> On 8/2/2006, at 3:47, El Cuco wrote:
>
> > Is there a way to set the default language for new documents to
> > something other than "plain text"?
>
> Yes, but it's a little tricky.
>
> First you need to find the UUID of the language you want as default.
>
> All the default languages are stored in TextMate.app/Contents/
> SharedSupport/Bundles in the Syntaxes folder of the bundle.
>
> This is in the binary plist format, so you'll need to convert it
> first to readable form. Let's say we want HTML to be the new default
> language, we would do (from terminal):
>
> % cd /Applications/TextMate.app/Contents/SharedSupport/Bundles/
> HTML.tmbundle/Syntaxes
> % plutil -convert xml1 HTML.plist
> % grep -A1 uuid HTML.plist
>          <key>uuid</key>
>          <string>17994EC8-6B1D-11D9-AC3A-000D93589AF6</string>
>
> Here "17994EC8-6B1D-11D9-AC3A-000D93589AF6" is the UUID. Now we need
> to tell TM to use that as default by altering its defaults database.
> First quit TextMate, then from terminal run:
>
> % defaults write com.macromates.textmate OakDefaultLanguage
> 17994EC8-6B1D-11D9-AC3A-000D93589AF6
>
> Start TextMate, and notice how all new documents are set to be HTML
> by default.
>
>
> ______________________________________________________________________
> For new threads USE THIS: textmate at lists.macromates.com
> (threading gets destroyed and the universe will collapse if you don't)
> http://lists.macromates.com/mailman/listinfo/textmate
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20060208/1ae47ddf/attachment.html>


More information about the textmate mailing list