Open dmilith opened 12 years ago
+1
I haven't received a copy of TextMate 2 yet, but will try it out as soon as it's open to the public again.
I've heard that the problem is with activating TextMate from PeepOpen. See #273
You may treat TM2 as TM1 without plugin support. I saw this feature done through ruby and it was tmbundle. Can You see for it in old peepOpen builds?
@topfunky now that TM2 is open sourced can you look into this again?
Cheers
+1
Would like to see tmbundle version of peepopen
+1
+1
+1
+1
Patch PeepOpen's AppDelegate.rb as shown:
if customUrl.query
# Don't try to gsub unless there is a query to work with.
editorName = customUrl.query.gsub('editor=', '')
editorName.gsub!("+"," ") # YOU ARE ADDING THIS LINE
Then you can add your own menu command to any TextMate 2 bundle manually such as:
#!/bin/sh
open "peepopen://${TM_PROJECT_DIRECTORY}?editor=TextMate+2"
This only seems to work if you pass the correct "TextMate 2" name to the binary (recompiling it first). I tried to just rename TextMate 2 to "TextMate2" and use the current release of PeepOpen but that didn't seem to do the trick. Perhaps it might if you dig around in the app's plist file or something, but that seems quite icky to maintain (since they are pushing out new builds every day).
I've emailed topfunky about getting this fix in the upstream binary so we can at least get it working pretty well until the official plugin/installer is fixed.
I should clarify the plugin script alone will currently pop open PeepOpen, but it won't switch back to TextMate 2 unless you apply the patch and recompile the binary first. :(
defaults write com.topfunky.PeepOpen editorApplicationName "TextMate 2"
Any time you change any PeepOpen setting you'd have to rewrite this default. This "fixes" it be setting the default editor to "TextMate 2" so you don't have to pass the editor in the URL (which currently isn't possible because it contains a space).
Plugin command:
#!/bin/sh
open "peepopen://${TM_PROJECT_DIRECTORY}?editor="
Of course you could probably add the defaults write command to the sh script as well... this shouldn't interfere with any other apps using PeepOpen as long as they are passing the editor in the URL.
Stupid question... where do custom .tmbundles go for textmate 2? I only see it's builtin option of installing existing ones from the server. I tried making folder and it didn't recognize it.
Library/Application Support/Avian/Bundles I think
Thanks, Josh. I'll try this out and issue a release.
One could argue the binary plugin is better but I find the sh plugin way more than fast. So as long as TM_PROJECT_PATH or whatever can be trusted I'm not really sure the binary is necessary any longer. I've been using it for real coding today on a project and no issues so far.
Thanks, Josh Goebel
On Sep 4, 2012, at 12:09 PM, Geoffrey Grosenbach notifications@github.com wrote:
Thanks, Josh. I'll try this out and issue a release.
— Reply to this email directly or view it on GitHub.
I stumbled upon this thread and tried the
https://github.com/yyyc514/PeepOpenTM2.tmbundle
bundle which didn't work.
After much googling I found that the name for TM2 is actually now 'TextMate' not 'TextMate 2' - just edit that in your bundle files and it worked fine.
@wakiki It depends on what your executable is named. Mine is named "TextMate 2". Is the TextMate 2 download named "TextMate" now?
@yyyc514 It is on mine, yes.
I just submitted a pull request for what works on mine.
@wakiki
Why were you trying my solution in the first place? The only reason I posted this was to deal with the name change... If the executable is named TextMate doesn't the built-in binary version provided with PeepOpen do the trick?
I'm not @wakiki but I will say it did not work for me using the built-in version. I was only able to get it to work using the forked version that I submitted to you.
Josh, no it didn't work in the first place, which is why I had to find an alternative solution. I can't remember exactly what problems I had, but changing the name in the forked repository did work.
Steve
On Tuesday, February 18, 2014, Josh Goebel notifications@github.com wrote:
@wakiki https://github.com/wakiki
Why were you trying my solution in the first place? The only reason I posted this was to deal with the name change... If the executable is named TextMate doesn't the built-in binary version provided with PeepOpen do the trick?
Reply to this email directly or view it on GitHubhttps://github.com/topfunky/PeepOpen-Issues/issues/272#issuecomment-35336713 .
I've updated my repository to reflect the "TextMate" naming.
Awesome, thanks @yyyc514
Thanks!
On 27 February 2014 16:34, Josh Goebel notifications@github.com wrote:
I've updated my repository to reflect the "TextMate" naming.
Reply to this email directly or view it on GitHubhttps://github.com/topfunky/PeepOpen-Issues/issues/272#issuecomment-36261114 .
Is there any way to spawn Peep Open window from Tm2 through a bundle command?