TLDR
Run this:
defaults write com.macromates.textmate OakDefaultLanguage DDEEA3ED-6B1C-11D9-8B10-000D93589AF6
Details
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/Shell Script.tmbundle/Syntaxes
$ plutil -convert xml1 Shell-Unix-Generic.plist
$ grep -A1 uuid Shell-Unix-Generic.plist
uuid
DDEEA3ED-6B1C-11D9-8B10-000D93589AF6
Here “DDEEA3ED-6B1C-11D9-8B10-000D93589AF6” is the UUID for Bash Shell Script. 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 DDEEA3ED-6B1C-11D9-8B10-000D93589AF6
Start TextMate, and notice how all new documents are set to be Shell Script (Bash) by default.
Notes
This works for TextMate 1.5Here's the list of supported file types:
- ActionScript.tmbundle
- Apache.tmbundle
- AppleScript.tmbundle
- Blogging.tmbundle
- Bundle Development.tmbundle
- C.tmbundle
- CoffeeScriptBundle.tmbundle
- CSS.tmbundle
- Diff.tmbundle
- Git.tmbundle
- HTML.tmbundle
- Hyperlink Helper.tmbundle
- Java.tmbundle
- JavaDoc.tmbundle
- JavaScript.tmbundle
- LaTeX.tmbundle
- Mail.tmbundle
- Make.tmbundle
- Markdown.tmbundle
- Math.tmbundle
- Objective-C.tmbundle
- OpenGL.tmbundle
- Perl.tmbundle
- PHP.tmbundle
- Property List.tmbundle
- Python.tmbundle
- Ruby on Rails.tmbundle
- Ruby.tmbundle
- Shell Script.tmbundle
- Source.tmbundle
- SQL.tmbundle
- Subversion.tmbundle
- Text.tmbundle
- Textile.tmbundle
- TextMate.tmbundle
- TODO.tmbundle
- Transmit.tmbundle
- Xcode.tmbundle
- XML.tmbundle
- YAML.tmbundle
References
http://lists.macromates.com/textmate/2006-February/008276.htmlShare this article
This work is licensed under the Creative Commons Attribution 3.0 Unported License.
No comments:
Post a Comment