Sublime Forum

Sublime Text 2: I don't get projects


I think I found a page explaining it once (not the official documentation), but I’m just not understanding projects.

I have a bunch of files open. Are they in a project, or not? How do I create a new project? What project are they in, if they’re in a project? If I have a bunch of files open in different locations, and some of them are related and should be “projectized”, and some of them are related and should be part of a different project, and some of them won’t ever be part of a project–how do I deal with this?

Some things I think are true from what I’ve read:

  • I think you can’t have more than one project open in a window at a time.
  • I can’t find a “new project”, and it seems like the way to do this is to open a new window and then either “add folder to project” or maybe “save project as…”. But if you open a new window and then open a file and then select “add folder to project”–you don’t have a project at this point, right?
  • I think that the only indication I have that I’m “in” a project is that the title bar has the name of the project in parens. But does that mean that every file I open in this window is now added to the project? Can I switch to a “not a project” project, or do I have to keep opening new windows for that?

I realize this might not be difficult for others (since many of you don’t seem to have this problem), but the way projects are represented just doesn’t seem to be intuitive or well documented to me. I’ve got this mental model of something like Eclipse, where everything is a project, and something like Notepad++, where most of the usage I see doesn’t use projects (though I imagine they do have projects)–and I can’t really tell where Sublime is on this spectrum.

Finally to Jon–thanks again for this awesome tool. Really. Just because I have my preferences, suggestions, and confusion doesn’t change the fact that you’re doing some great work here.



You always have a project open in Sublime, however you may not have saved the project to a file. As soon as I understood this, everything was more clear.

  1. Right, you can only have one project open in any given window
  2. If you close a project a “new” one is automatically created, it just hasn’t been saved yet
  3. The title bar includes a name if you have saved the project

The single best thing about projects is saving a couple and then using the project switcher, ctrl+alt+p/cmd+alt+p. This makes switching projects as fast as switching files, and it remembers all of your open files, settings, what you have selected in each file, unsaved changes to files - basically everything. It makes working on multiple projects so easy and painless. When a client calls with an edit I can literally stop in the middle of typing a variable and fix something else and then return to where I was without having to worry about anything.



Personally I’d find projects a lot more useful if they included the state of the tree. I’m usually editing files 5 or 6 levels deep and the most annoying part of switching projects is opening up the tree. This would be less of a problem if there was an option to locate a file in the tree view or to keep the tree selection synced with the active file.



I +1 that!

Keyboard navigation too. So long as the sidebar has active state, then keys should do something to it!



There have been some other posts about this subject in the forum as well. My personal feeling is that starting project support over with a (working, predictable) Textmate-style model, and evolving slowly from there, would serve the users best.



For anyone who is interested, the conversation being referenced is located at Thoughts on how to improve the sidebar and projects.