Sublime Forum

Double-click Project File in Finder

#1

This opens the file for editing, in a tab in a window with the docs that were open on quit (which might be another project).

Is there no way to allow for double-clicking a project file to open the project itself?

1 Like

#2

Double clicking a .sublime-project file in Finder will open the project for me (as a project, not for editing)

1 Like

#3

If the project has already been opened once, then it works as you say.

But after rebooting Mac, then double-click on project opens that file for editing. Even if I try again.

After I open it with the Project menu once, then every time I double click in works right.

1 Like

#4

same problem for me (on ST2), it opens .sublime-project for editing but not the corresponding project … And even if I open the project once, I still have this behavior … it would be really great to be able to change that, it misses the purpose of projects I think …

0 Likes

#5

I am having this same issue. I recently switched from Windows to Mac (at least I’m trying it out) and this is a big negative for me. I like to open my projects from the Finder, but it doesn’t work properly. I find like others it is unreliable whether the project itself opens or the project file for editing. Furthermore, even when the project opens, there is something wrong with it. First of all, none of my open files appear, second, when I go to the Project menu, Close Project is disabled. Shouldn’t you be able to close the project if it is open?

Why is there no response on this in 3 years?

0 Likes

#6

Solved this (finally) shortly after posting this.

If you open the workspace instead of the project, everything works as expected.

0 Likes

#7

For Mac OS X I created an Automator “application” and added:

Library > Utilities > Run Shell Script

In the panel:

  • Shell: /bin/bash
  • Pass input: as arguments

Code:
# subl accepts only sublime-project, so we’ll need to rename
# sublime-workspace files to point to the sublime-project file
find=".sublime-workspace"
replace=".sublime-project"
for file in “$@”
do
“/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl” “${file//$find/$replace}”
done

NOTE: You may have to change the path to the main Sublime Text.app in the code above… e.g. “Sublime Text 3.app” or whatever / where ever you named the app.

Then, of course, “command i” on either a “foo.sublime-workspace” or “foo.sublime-project” file to “get info” and change “Opens With” to your newly created app… and “Change All” too.

0 Likes