I’ve been placing my .sublime-project
and .sublime-workspace
files a single directory called Sublime Text
for all my projects. I then open the file with sublime to get to the project (from Finder or from control+command+P). My question is, am I doing this wrong? Should I be placing these files in my project folders? Should I be including them with git? What’s the recommended way of handling these files? What are some things that I can do to really put them to good use?
How should Projects/Workspaces be used?
It’s purely a matter of preference and your own use case as to whether you want to keep your project files within the folder that it’s representing (which is what I do) or in some external folder where you instead keep all of your projects (which is what you’re doing).
Regarding putting project into git, that’s also a personal preference thing. Depending on your use case, there may or may not be a reason to do so. For example, if the project just specifies the project folder, that’s easily repeatable, while if you had project specific settings or build systems, it’s not.
I think the only real recommendation in this regard is that if you store those files in git, you should include the sublime-project
but not the associated sublime-workspace
. That’s primarily because the workspace is storing things like the list of files you have open, search terms, etc. As such it changes constantly and will more or less always appear to have changes in it.
I personally keep my sublime-project
files associated with my code projects and check them into git, but I know a lot of people prefer the method of keeping all of their project files in a single location as well.