Launching two versions of TextMate side-by-side

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Launching two versions of TextMate side-by-side

philcrosby
Hey everyone,

While developing the textmatevim plugin, I've been editing the plugin's source in one instance of textmate launching/debugging the plugin in another instance of textmate. I'm wondering if there's a cleaner, standard way of launching two textmate instances such that there are no side effects.

This is what I'm currently doing:

# Create a second instance of textmate
cp -R /Applications/TextMate /Applications/DevTextMate
mv /Applications/DevTextMate.app/Contents/MacOS/TextMate /Applications/DevTextMate.app/Contents/MacOS/DevTextMate
cp -R cp ~/Library/Application\ Support/TextMate ~/Library/Application\ Support/DevTextMate

# Launch
/Applications/DevTextMate.app/Contents/MacOS/DevTextMate

This approach has some side effects. At one point "DevTextMate" somehow became registered to open all code files. Often one or the other textmate instance will also open the release notes, as if it's the first time it's being run.

Let me know if you have any suggestions. Thanks,

-Phil Crosby

_______________________________________________
textmate-plugins mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate-plugins
Reply | Threaded
Open this post in threaded view
|

Re: Launching two versions of TextMate side-by-side

Allan Odgaard-4
On 23 Mar 2011, at 06:56, Phil Crosby wrote:

> […] I'm wondering if there's a cleaner, standard way of launching two textmate instances such that there are no side effects.
>
> […] This approach has some side effects. At one point "DevTextMate" somehow
> became registered to open all code files. Often one or the other textmate
> instance will also open the release notes, as if it's the first time it's
> being run.

I suggest you edit DevTextMate.app/Contents/Info.plist:

 1) remove the CFBundleDocumentTypes array. This should avoid registration of file types¹.
 2) change the value of CFBundleIdentifier. This should make the system see it as a different app with own settings etc. It is in the settings TM store its version number, and if it is different than last launch, it shows the release notes.

Hope it helps.


¹ The OS has a tendency to use the last opened application for file types you haven’t specifically chosen an application for.

_______________________________________________
textmate-plugins mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate-plugins