It took me forever to figure out what the dropdown at the bottom of the TextMate window is called - you know, the one where you select the language you want to use. As it turns out, “language” would have been a good starting point in the Google, but it took me a while to figure that out. It’s the one that says “Blog - Markdown” in this screenshot:
Anyway, I wanted TextMate to default to Markdown instead of Plain Text, and once I figured out what to search for, I found my answer pretty quickly.
To find the UUID for Markdown, I did this:
% cd /Applications/TextMate.app/Contents/SharedSupport/Bundles/Markdown.tmbundle/Syntaxes/ % plutil -convert xml1 Markdown.plist % grep -A1 uuid Markdown.plist <key>uuid</key> <string>0A1D9874-B448-11D9-BD50-000D93B6E43C</string>
And once you’ve got that, this line sets the default:
% defaults write com.macromates.textmate OakDefaultLanguage 0A1D9874-B448-11D9-BD50-000D93B6E43C
The UUID is specific to Markdown, so you can just execute that last
defaults write line (thanks Drew!)
Also, blogging from TextMate is pretty handy. You may have noticed that the screenshot includes the beginning of this post, because I was writing it just then, right in TextMate. Handy, I tells ya.