subhaze / sublime_codekit

Sublime Text plugin to run CodeKit 2 commands
35 stars 1 forks source link

Project auto-switching not working #1

Closed joeldbirch closed 8 years ago

joeldbirch commented 10 years ago

This is the package that had to happen, thanks!

It seems that project auto-switching is not working for me, although I can switch by selecting "Codekit: select project from view" via the command panel. All other features seem to work great.

Sorry, I'm not sure what info you need from me to demonstrate the issue further. Please let me know.

subhaze commented 10 years ago

Hmmm, I've had one issue where my projects wouldn't switch due to a . in the folder name of the project. The only work around right now is to remove the . in the folder name.

The auto-switching uses the current folders found within the project/window as a key to know whether or not it should try switching, so, if you have two projects in the same window the plug-in wont trigger the change. I took this approach to prevent ST from hitting the CodeKit API on every file focus. I'm currently working on an alternate approach right now so that you can have two projects in the same window and it still properly changes the active CodeKit project

subhaze commented 10 years ago

@joeldbirch I've updated the logic on how auto-switching works. It's a bit more intelligent on how it figures out what project to sync CodeKit to, so you can now have views from different projects/folders all in the same window but still correctly trigger CodeKit to activate the project they're part of.

Not sure if that was your exact issue, but hopefully this update resolves your issue.

As for "what info you need", I'd say the best bet is to open the console in ST via "ctrl+`" and see if there are any errors printed there related to this plugin. I might look into adding a debug layer to print things to the console, but for now I'm hoping things stay simple enough to not go that far :)

Hope this plug-in helps speed up your work flow! and please re-open if you're still seeing the issue after receiving this most recent update.

joeldbirch commented 10 years ago

Thanks for this. I now have two windows open with a different project in each and Codekit is switching between them. It's wonderful.

I haven't seen Codekit start up from having Sublime projects open, however. I have to start it manually. Not sure if that is correct.

Anyway, thanks again!

subhaze commented 10 years ago

Awesome, glad it's working for you now.

I haven't seen Codekit start up from having Sublime projects open, however. I have to start it manually. Not sure if that is correct.

Yeah, CodeKit should start up automatically when auto-switching is enabled. Currently things are working as expected for me: Close CodeKit, then focus on a file in ST that has a CodeKit project associated to it and it'll fire up CodeKit. I'll dig around a bit on this.

joeldbirch commented 10 years ago

The switching only works sporadically, or breaks easily. It's currently not working given the same scenario in which it did during my last post. There is nothing relevant in the ST console. This is Sublime Text 3, BTW.

joeldbirch commented 10 years ago

Thought I should mention that I've discovered all sorts of issues with Codekit itself (in combination with Mamp Pro vhosts) since updating to Yosemite, so these issues may well be limited to my computer. If I ever sort out Codekit I'll retest sublime_codekit and let you know how I go. For now, I'm back to Grunt for everything :/

subhaze commented 9 years ago

@joeldbirch it's been awhile :) but, I was able to consistently recreate this issue with the current projects I had setup and fortunately it was a quick fix once I could replicate. Hopefully this solves the issues you were having too.

joeldbirch commented 9 years ago

Hello, thanks for this. I'm going to try it out again. Cheers!

joeldbirch commented 8 years ago

Just noticed this issue is still open. I should have returned to confirm that this issue was fixed. Thanks!