I maintain two separate workflows. On the one hand, I do a lot of writing, and I like to work in plain text for the most part. As a result TextWrangler is my favorite Mac text editor for that. I have it configured to be all black background, no margins, light color text, etc. It’s perfect for distraction free writing.
I also do web programming and Text Wrangler is the best free text editor for that too. However, when I do web programming, I want syntax coloring, tab indicators, the open file sidebar, and other settings as well.
Ideally, I want to have two copies of TextWrangler with completely different preference files, different icons, etc. I want to create a custom version of my favorite text editor.
With about 20 minutes of Internet searching and 10 more minutes of tweaking, I was able to get 90% of my holy grail customized!
Here’s how to do it yourself with TextWrangler, and I think the principles should apply for creating customized versions of other apps as well.
- Copy TextWrangler to a new location (I put it on my desktop at first)
- Rename the app file to whatever you want. I chose “DarkRoom” as an homage to WriteRoom.
- Right click on the app icon and choose “show package contents”
- Double-click on the “Contents” folder
- Open up Info.plist using your original TextWrangler App or any other text editor.
- Replace all instances of “com.barebones” with “com.custom.barebones” (this changes where OS X stores the preference files on your computer)
- OPTIONAL: replace instances of “textwrangler” with your customized name. There is one instance in the original file of “com.barebones.textwrangler” that after step 6 will be called “com.custom.barebones.textwrangler” You can freely change that to anything you want. For mine, I changed the word textwrangler to darkroom.
FINAL OPTIONAL TWEAKS: Replace instances of “TextWrangler” with your customized name. There are hundreds of instances of TextWrangler and changing the wrong ones might break your app, however there are a few ones you can change safely without breaking things. To determine which you can change, read the
field. Key string pairs look like this:
<key>CFBundleTypeName</key>
<string>TextWrangler text document</string>
You can safely change any string in the following keys:
- CFBundleTypeName
- CFBundleName
- NSMenuItem
- NSPortName
ADVANCED TWEAKS: You can also change the icons for the app by going into the “Resources” directory and replacing any one of the icons with a different icon so long as you keep the file name of the icon the same.
When you are done, you’ll be able to have two completely different instances of your app running at the same time with different preference settings and you can associate different file types with different apps.
Here’s a screenshot:
For those who want it, here is my entire plist file.
When you open your edited app, it will behave like a completely new installation of TextWrangler and it will use separate preferences files…
HOWEVER: Your customized app and the original TextWrangler app will use the same recent document list. That means if you have one of them set to “reopen last document” it will open the document that is currently open in the other editor. It’s a bit annoying, but I haven’t found a way to solve that problem yet.
Leave a Reply