Using Ruby on Rails as Default in TextMate

OK, you already know that TextMate is the best text editor in the world. Since you are reading this post I assume that you think Rails is pretty damn good, or you are just learning it. One of the things that has bugged me since beginning my journey to Rails programming has been getting TextMate to use Ruby on Rails as its default.

Maybe this isn’t the right way, or the best way, or maybe even necessary – but I use it, like it and suppose if I do then someone else will too. We need to tell TextMate to use the Ruby on Rails UUID key as default by altering its defaults database:

  • First quit TextMate, then from terminal run:
  • % defaults write com.macromates.textmate OakDefaultLanguage 54D6E91E-8F31-11D9-90C5-0011242E4184
  • Start TextMate, and notice how all new documents are set to be Ruby on Rails by default.

That’s it…