# My TextMate 2 Setup

I switched back to TextMate 2 from Sublime Text 2 full time a while back and I am really happy with the way I have it looking and working. My “My Sublime Text 2 Setup” post is quite popular, so I though I’d create the same for TextMate 2.

## Theme

I am using my CombinedCasts theme which merges a modified RailsCasts theme for coding and a light theme for markdown and text editing. You can download the CombinedCasts.tmTheme file here then double-click the downloaded file to install it.

One problem with the default Markdown preferences in TextMate 2 is that it uses a horrible font. So I created a new set of preferences in a bundle to override these and make headings use the Menlo font instead of Baskerville. This bundle is available at https://github.com/hiltmon/hiltons-bundle and the installation instructions are in the README file.

## Bundles

One of the benefits of TextMate 2 over Sublime Text 2 is that adding new bundles, themes and languages is all built-in, you do not need a third party package manager. The first time TextMate 2 encounters a file it does not recognize, it gives you the option to download and install the bundle for it.

You can manually choose the bundles you want to start with by going into TextMate / Preferences… or typing ⌘, and switching to the Bundles tab. Some bundles I really like include:

• CSS, HTML and JavaScript for web work,
• Ruby, Ruby on Rails, CoffeeScript, JavaScript, JSON, and YAML which is where TextMate has traditionally excelled,
• Git for source code control,
• Shell Script for all my automation,
• TODO to track and show TODO comments,
• My Gists bundle to integrate with Github Gists,
• And of course, Markdown for writing.

## Properties

You don’t really need to do anything else. TextMate 2 automatically saves your global, font, theme and language specific preferences as you set them. Whenever you go back to a file, the preferences are just there.

But if you really do want to tweak TextMate 2 even more, you can create a .tm_properties in your home folder for global settings and a .tm_properties file at the root of each project for project specific settings.

My global .tm_properties is this:

This mostly sets tabs and spaces for the most common languages that I use, as well as forces a reset of the theme and font whenever I load the application.

For the Kifu project, I have a .tm_properties in its root containing:

This shows the Git branch in the title bar and assumes all blank files are rails files.

## Works for Me

I also run the file browser to the right, have Software Update set for Nightly Builds, show command output in a new window and use the rvm version of ruby from my RVM in TextMate 2 post.

With these minor changes, I feel I have the best programmer’s editor environment in TextMate 2 for my own needs and use it every single day.

Follow the author as @hiltmon on Twitter and @hiltmon on App.Net. Mute #xpost on one.