Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On Mac OS X over time I get multiple instances of TextMate running. Is there any way to prevent this?

edit: i'm launching from the command line alias, and from the finder. yes, i only have one copy installed on the hard drive.

More Details:
Recreation: Textmate is open, I've launched it via clicking on a file in the finder. Then I run this script to open my hosts file with textmate:

`/Applications/ /etc/hosts`

After that I have two instances open. They both show up in task switcher, and they both show up in the dock. When I go to the dock and do "show in finder" they both point to in the applications folder. and, @romainl, yes, there are two instances in the activity monitor.

Is that script the culprit?

share|improve this question
Would be helpful if you knew what was causing them to be launched...are you sure you only have one copy of it installed on disk? – peelman Mar 9 '11 at 20:15
there is just one. i thought it would prevent this automatically. – cwd Mar 10 '11 at 3:11
It should be. There's a mitigating circumstance here. When the second one opens, right click on it in the Dock and go to options->show in finder, just as a paranoia check. Are you opening protected files? Its hard to tell you how to prevent it when you haven't given us enough information to identify the cause...we need to start there. – peelman Mar 10 '11 at 3:12
I suggest you delete the mate utility and reinstall it again from TextMate » Help » Terminal Usage… to make sure it's up to date and created using the supported way. – Daniel Beck Mar 10 '11 at 3:29
I'm unable to replicate this on snow leopard via the command line, what os x release are you using? – Nathaniel Bannister Mar 10 '11 at 4:00
up vote 1 down vote accepted

Yes. That script directly starts the executable.

Use the following instead:

open -a TextMate /etc/hosts

This doesn't launch a new instance, unless explicitly told so by using the -n switch (which TextMate ignores anyway).

share|improve this answer
Seriously, what do you expect? You are launching a new instance of TextMate that happens to open the specified file directly after launching. Of course you have two instances running afterwards. – Daniel Beck Mar 11 '11 at 17:35
You don't need to capitalize TextMate, open -a textmate works just as well and is more finger-friendly. The official mate utility mentioned by @Daniel Beck is even better and makes less typing. – romainl Mar 11 '11 at 19:56
I also found that using this command prevents a new instance, it is using the command line alias tool: /Applications/ /etc/hosts – cwd Mar 14 '11 at 14:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.