Sublime Forum

Projects and Workspaces

#11

Like wbond, today I have multiple project for the same set of directory, and i basically use to be able to switch quickly from one workspace to another, it works really well
But if you do it, I think we need the same kind of quick switch from one workspace to another, all belonging to the same project.
I think the advantage would be that we get always a short list when we want to switch from one workspace to another. Because with the current implementation, if you start to have 3 or 4 different project each with 3 or 4 different workspace the list start to be long (even though the quick search helps a lot :smile: )

1 Like

#12

Or just prefill text like command palette…

Out of interest how many people keep their sublime project files outside the project root?

0 Likes

#13

I do, for a handful for projects where the code is on a network mounted drive. It’s much faster to load the workspace when it’s saved locally.

0 Likes

#14

There were times I wanted to differentiate between projects and workspaces. But I learned using sublime projects like workspaces and get used to it. It is quick, reliable and simple.
I see no need for a change anymore.

Sometimes I#m forced to use Eclipse. An example how to make it complex and hard to use - horror!

0 Likes

#15

Good to see you pop up Jon, sounds like stuff’s happenin… I like the proposed idea, it gets my +1 so long as the UX is done nicely. As a starting point for the UX I’d like to see:

  • drag and drop for project and workspace files handled nicely
  • API hooks to load and save
  • switch projects and workspaces in the current window or open in new window, with definable shortcuts (palette, keyboard, menu)

Basically, keep things flexible.

A simple way to have the new and old behaviour is a preferences bool “projects-old-behaviour”. If true, projects load and save same named workspaces as per current behaviour.

On a related note, one thing that really irks me with sublime is not being able to load it up from the command line completely blank and sessionless (for git comments etc.). If I try to do this with a project, I get 2 sublime windows, one with the last session/project, and one with the project I’m loading. Which is focussed, at least on Windows, is anyone’s guess also making this a nightmare to use; this stuff’s buggy atm. What I’d like is subl --nosession that just loads a sublime window devoid of any projects, files or workspaces. Since sublime uses the same process for all windows, things get a little clunky if sublime is already running, especially on Unix, but we can use --multiinstance to deal with that.

Using --multiinstance allows us to run our own sublime process, but we can’t avoid last sessions being loaded up, and I’d like to be able to run a sublime instance with nothing loaded in and no state saved. So then, when I run sublime again normally, my usual prior saved session loads up.

At present the UX of sublime fits the traditional launch methods (ie. commandline) of editors badly while being friendly for the GUI user. Separating workspaces and projects is a great idea, but don’t lose sight of how to improve related aspects of what’s already there. Simplest would be a --traditional flag that launches multiinstance, no session and indicates this run mode in some way on the titlebar. Closing the window isn’t allowed without confirming file saves, ie. no hot exit.

Another idea (from Crisp, my “other editor”) would be to offer a directory specific state; project and workspace, loaded --multiinstance when subl is launched from that dir. This workflow fits really nice for the command line user. You launch sublime from project X directory, and it’s workspace and project state load up. Launch from somewhere else, you get a the project and workspace of that folder.

Ok… Stop here, I’m drifting off-topic…

ps. --help doesn’t work in Windows either :wink:
pps. ok, totally offtopic, but pretty please for removing the menu in Linux!

S

0 Likes

#16

[quote=“tgkeul”]There were times I wanted to differentiate between projects and workspaces. But I learned using sublime projects like workspaces and get used to it. It is quick, reliable and simple.
I see no need for a change anymore.

Sometimes I#m forced to use Eclipse. An example how to make it complex and hard to use - horror![/quote]

+1
I’m happy with the way it works now.

0 Likes

#17

TL;DR, 1: project, 1: workspace, M: windows, M: view arrangements

Should a workspace map 1:1 with a window? On reflection, I don’t believe so.

What if, like others have pointed out, you have multiple clones of files open in
different windows.

I think clone state should work across windows, likewise with undo state.

With the GOTO anything panel current behaviour of cloning a new file rather than
switching to an existing open one, there’s going to be potential for
confusion/conflict. I know I end up with clones I didn’t explicitly want opened
a lot. The point being here, GOTO anything is great when you just want to
mindlessly navigate to a file, and not search your sidebar / tabs. Being easy,
people will gravitate to that behaviour.

( side note: I’d prefer cloning to require an explicit command and goto anything
to focus on previously used clone)

What I really want is a way to quickly set the positioning of views amongst the
different layout cells, with an invisible group for momentarily unused files.

I believe for this to work nicely the switching must be lightning fast and undo
not to be lost between switches.

I think being able to script and auto tile arrangements with named groups would
be awesome.

Sublime Text 2 is frustratingly close but no cigar.

0 Likes

#18

That was a bit muddled upon reading back, but I think having separate sessions where the state of the same files across multiple windows gets in conflict is not a great idea.

I’m talking about issues of having a window map to a *.sublime-workspace file and the sessions being independent for everything but project settings/folders.

0 Likes

#19

I just would like to see Projects only save their contents (the files and folders opened or added via drag) when the user saves it.

This way, even if I close some files the are still in the Project. I can open the Project again and get all my files back.

To me, I like to set up a Project with every file that is involved with a project at work. These are often files scattered across dozens of folders. Adding these folders is not an option, since they contain hundreds of unrelated files. Therefore, the only way I can group the files that comprise a project is to add them one at a time. This is OK, as long as the project file would remember the files involved. As ST currently works, if I close a file it’s gone from the Project instantly. I need to remember what files I worked on and maybe re-open them. This is not helpful. The only way to maintain all the files in the project is to keep them open, which clutters my workspace.

So, please, I hope a way can be devised to save a project and closing or adding new files just “dirties” the project window – prompting for a save when you close the project window.

0 Likes

#20

The suggested changes to the projects in SublimeText sounds a lot like a basic implementation of the task-focused interface integrated in Eclipse (Mylyn - eclipse.org/mylyn/). Although a lot of people here justifiably don’t like eclipse (I agree that it is extremely bloated), this is a really fantastic and powerful feature of Eclipse. Except for certain tasks I try to keep my distance from Eclipse, but every time I do use Eclipse I am reminded how cool the features of Mylyn are.

For those of you who are not familiar with Eclipse, Mylyn is a “task-focused interface”. You create a “task” in Mylyn and it gives you a filtered view of the project with only the files that you have viewed or edited while working on that task (referred to as the task context). It is extremely helpful when switching between different topics on the same code-base (helps with your mental context switch). For example, if you are working on some back-end processing logic, you don’t need to have all of the front-end code cluttering your view.

From the Mylyn website:

I know that a full implementation of Mylyn’s functionality is out of the question (and would be too much), but being able to have multiple views into the same project would go a long way towards bringing these features to SublimeText. If each workspace also kept it’s own closed file history , I would be a very happy camper. For now I will continue to mimic this behaviour by creating new projects with the same linked directories for each task.

0 Likes

#21

Thanks the heads up on mylyn. I tend to use eclipse a bit these days for android dev. By god is it slow!!! Android development in general kinda sucks.

Note also, you can make symbolic links to your *.sublime-project files, so as to keep essentially the same settings/folders.

0 Likes

#22

I’m all in for separate workspaces. Having the ability for a “quick shift” between features (e.g. having client stuff separate from server stuff) would be an awesome addition to my toolbox, and I do not personally think that having to save the workspace separately from the project even remotely approaches “increased complexity” (As long as it still autosaves the workspace when it has been created. :wink: )

0 Likes

#23

Weeks later, now that I know that a quick way to create, switch to, and delete workspaces could exist, I keep finding reasons why I’d want to use it.

0 Likes

#24

I’ve got to say I would also find this really useful. What’s the current status of this feature?

0 Likes

#25

Multiple workspaces for a project would be very helpful indeed. Fast switching between projects and workspaces is essential - otherwise additional steps to set up the workspaces as such is not a deal breaker.

0 Likes

#26

What’s implemented in Sublime Text 3 is a hybrid of the initial two proposals: interface wise things mostly work like S2, but you can make additional workspaces for the current project (via the Project menu).

0 Likes

#27

I’m excited about this feature. If some of the plugins I’ve already purchased worked for Sublime 3, I’d already be using that version.

0 Likes

#28

I would like to see the ability to have one instance of ST3 active yet have multiple projects open.

Right now I am working on two related projects. an android NDK library which will be a sort of interperter that I can use in a game I am developing. This library is a separate project to the “source” files it would be interpreting for this game because i could potentailly use this same library for ANY other android application i develop. Each application would have its own scripts.

I am currently forced to have two instances of ST3 open. One for the lib/interpreter and the other for the games scripts. If I close one instance of ST3 and then teh other I will not get both of these projects opening back up when i re-launch. if i quit out of X and thus KILL both intances then launcting ST3 opens both back up. It would be nice to be able to close ST3 and have both projects open back up on launch - it would be MAJORLY preferable to only have to have a single instance of ST3 open back up :smile:

Also: How about an option for a ~/.st3 where all project files get created. if the “PROJECT_FOLDER” or whatever setting is left blank then project files get created in the current working directory.

0 Likes

#29

Can it be made possible that when within a current project, the workspace switcher (which should be a separate feature/panel from the project switcher) would only make workspaces within my project available?

This would allow me to name a workspace based on the feature and it doesn’t require some project tag within the namespace. Also makes the panel itself less cluttered.

Also with the current 3114 release is there any requirements in order to create a new workspace? I see the option under Project but it is greyed out. Also planning on binding it to a key so that I can create new workspaces on the fly.

0 Likes

#30

Seems there is no clear, to me, definition of a Project VS a Workspace, and up to some extend, the implementation goes in diferente direction than expected.

To me, if a project should have multiple workspaces (and that seems great), it should be a way to go from one to another.

I see a Project indeed need a workspace:

  • lets call the default
  • it needs same filename (with diferent extension)

And as a workspace:

  • it can not be saved outside of the scope of a project
  • it use the project setting file, only to keep track of the folders added to the project

Personally, I found very useful the workspace thing to keep unsaved data (like to-dos) and separate by different workspaces, different kind os tasks (documentation, development, some_feature, etc…)

SO, I PROPOSE :

A - add a reference into the project settings file to the workspaces it contain

B - add a new section in the side bar, with the workspaces for the project (easy navigation)

C - take away the workspaces from the switch-project view ( CTRL + ALT + P) that is confusing, at least, when the project is not open, or make a dependency

I know this is an old topic, and maybe nobody is using the workspaces, so, why to keep it then ??

1 Like