Is there a way to create multiple workspace files for a single project? It seems counter-intuitive for each workspace to need a separate project file. Plus it'll make it super clear that only one project file is checked into git and all the .sublime-workspace files have been .gitignored.
In SublimeText3 you should be able to create new workspaces for the open project from the Project's menu or ctrl+shift+P and search for New workspace for project.
This will create a new window with the current project open. I can't determine if the existing .sublime-workspaces file actually stores both, but you are given the option of saving the current workspace and you can then name it accordingly.
As you accumulate workspaces you can quickly switch between them using the ctrl+alt+P to access the switch project dialog. It will list both recent sublime-workspaces and sublime-projects and I believe it is limited to only those which aren't currently open.
Related
I think both are doing the same! When should I use aworkspace and when a project, and what are the differences?
Projects in Sublime are contained in sublime-project files, and allow you to:
Control what folders are present in the project
Per folder control of what files and folders from within are rejected from the project or included in the project
Can contain settings that apply only to files open in that window
Can contain build systems that apply only from within that window
Persist the window layouts, open files, undo buffers, selected items in panels, and so on in an associated sublime-workspace file (or files; you can have more than one sublime-workspace associated with a particular project.
Workspaces in Sublime are are stored in sublime-workspace files, and:
Contain anonymous project data as in a sublime-project file, except that your only access is to the list of folders open; the ability to control the contents of them or to use project specific settings and build systems is not present. This information is considered Anonymous because it's not persisted to disk, and is not editable (except in adding or removing folders using menu items)
Persist the window layouts, Open files, undo buffers, selected items in panels, and so on.
A sublime-project always has one or more sublime-workspace files associated with it, whereas it is possible to have a sublime-workspace file that is not associated with a project if you desire.
Generally speaking, if you're working with source control (e.g. git), then you would include a sublime-project file in the repository but not a sublime-workspace file. This is because anything you do will modify the workspace file as well, making life painful when it comes to checking things in.
So, overall, the tradeoff between using Projects or just Workspaces revolves around what you're doing. If you're just opening folders and want to persist that window, but you don't have any need for the more advanced abilities that Projects provide, there's no reason to use them.
In Xcode how do I create a new workspace and add 1 project to it so that I can see the project and its files?
If I just drag in the project, all I can see is the project it cannot be expanded, I cannot see the files. Also, is there anyway to copy over existing schemes from the project so that they can be used in the workspace?
First choose file > new > Workspace...
Then, you must first, and this is important, you must first close the project that you want to drag in. Than drag in the .xcodeproj file from the finder to your new workspace. Then it will appear properly and expand to show all of its files and your schemes will be available.
Although the accepted answer is correct, there is an alternate way to accomplish the same thing, and it is arguably easier/more straightforward. You can just open up the project in Xcode and click File -> Save as Workspace...
Bam! You now have a workspace with 1 project in it, as requested.
Just FYI, 2020, Apple recently added a thing,
make your workspace, exit it and
make your new project. in fact when you enter the name to save the project,
they added this option:
just select the workspace you wish to add it to.
Besides all above solutions you can use this alternative. Let's say you have a workspace and a project that you want to add to that workspace.
Close your project.
Open your workspace.
Option + Click in the Project navigator. Make sure you are clicking on an empty area, not on the existing files or folders.
In the context menu, select "Add files to your workspace...".
Finally select your project xcodeproj file on you disk.
Have a nice project 😉,
Add project into workspace
As alternative
- Close a project that you are going to add to a workspace
- Open Project Navigator -> Right click -> Add Files to "<workspace_name>"...
I just noticed that my one-project solution is in:
C:\Users\Clay\Documents\Visual Studio 2013\Projects\Platypus\Platypus.sln
...whereas the project itself is in:
C:\Platypus
What is the sense of separating things out that way? I did choose the project's folder, but not the solution's. I can see why the "buried" location would be used if I hadn't chosen a specific separate location for my project, but I would expect that choice to have put the project AND the solution in that folder.
Seems like a weird way to run a ship.
Is this normal? Any "gotchas" as far as backing it up goes? IOW, is backing up the project enough, or do I need to explicitly back up both?
This is the default location at which the solution file is created however if you want to change the location of the solution file then try when you create the project simply uncheck the default box for "create directory for solution". This will create the File (.sln) in the same directory as the web project. Or you may start with a Blank Solution under "Other Project Types-->Visual Studio Solutions" in the New Project dialog after that add your website.
I'm writing a MEF extension for Visual Studio. It's a Classifier for a custom language. I need to get the current changeset for the file - I think from TFS.
If you right-click on the file and choose properties it says "latest version" - I believe this is the latest changeset associated with the file.
I'd like to create a TFS workspace, and then get the changeset number, but I'm stumped on how to figure out the current workspace mapping from the physical path of the file in the editor.
For example, if the file is "d:\workspace\solution\random_folder\junk.txt", how do I know where the workspace for the file is mapped in TFS?
Should I just map a workspace and then search for a file called "junk.txt"? What if there is more than 1 file in different sub directories.
Thanks for any help!
You can't put one workspace beneath an existing workspace, this can't be handled correctly.
To create an additional workspace open VS and go to SourceControlExplorer. In the menu is a dropdown for Workspaces, choose "Workspaces ..." and a new dialog will open. Press the "Add.." button to create a new workspace and there you can choose which ServerPath is mapped to which local path.
When adding a new item in a Visual C++ project, the default path for the new file is the project path. Are there any per-project or per-solution settings that allow this default path to be modified?
For example, to add new files by default to a subdirectory of the project folder, or even to somewhere outside the project folder?
I understand that filters can be used to automatically organize files visually within the Solution Explorer based on file extension, but I would like to actually place the physical file in another location without the need to browse to it.
I'm using a Visual C++ project as a container to to manage and organize (filter) editing of runtime-compiled files, and don't want developers to accidentally place new files outside of the intended folder, nor do I want the project file to exist in this code folder.
I did discover that if you create a new file in a sub directory of the project, that the Add Item dialog will default to that path when you add another file during that session, but it does not persist the default to the project or solution for future sessions.
I don't believe there's anything built-in. Some commercial add ins make the behavior better. For example, Whole Tomato's Visual Assist X package always uses the same directory as the currently open file, IIRC.
There are a couple of open source add ins that let you modify the behavior. For example, this one.