AVANIM :: TecHarmony :: Set TextMate's default file type
Set TextMate's default file type
April 06, 2010 | Comments: 0Let’s say you want all new files to open as Textile, you would follow this sequence of shell commands:
$ cd /Applications/TextMate.app/Contents/SharedSupport/Bundles/Textile.tmbundle/Syntaxes $ plutil -convert xml1 Textile.plist $ grep -A1 uuid Textile.plist <key>uuid</key> <string>68F0B1A5-3274-4E85-8B3A-A481C5F5B194</string>
This is just an example. If you wanted all your new files to open as Ruby, then you would use Ruby.tmbundle/Syntaxes on the first command, and Ruby.plist on the 2nd and 3rd.
But here‚ or the Textile example, 68F0B1A5-3274-4E85-8B3A-A481C5F5B194 is the UUID. Now we tell Textmate to use that as default by altering its defaults database.
Quit TextMate, then from terminal run:
$ defaults write com.macromates.textmate OakDefaultLanguage 68F0B1A5-3274-4E85-8B3A-A481C5F5B194
Start TextMate, and notice how all new documents are set to be Textile by default.
