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.
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
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:
- 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.
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.
.tm_properties is this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
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:
1 2 3 4 5 6 7
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.
See also: TextMate 2 Basics