You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Once all of Atom's bundled packages have basic support for multiple root folders, we should step back and consider how Atom's multi-folder support could be improved. Atom users, if you have observations or ideas about how we could better support working on multiple projects concurrently, please share them here.
Note that even basic multi-folder support isn't complete yet. To track that, see #770 (comment). Also, if you have anything to report that's obviously a bug, please make a separate issue for it.
/cc @atom/core @atom/non-github-maintainers
I'll summarize/dedupe the ideas we come up with:
Rename tree-view commands to clarify Add Folder vs Add Root Folder - @50Wliu
Persist combinations of root folders via an explicit project file, not based on which paths were originally opened - @wvanlint
atom path1 path2 should always result in both paths being added to the project, even if path2 had previously been manually removed from the project last time Atom was opened with those paths - @D-side
Project files should be strictly optional - @mark-hahn
Project files should be implemented in a way that would later allow storing project-specific settings - @lee-dohm.
I was too late to comment on the original tree view PR, but I guess I'll do so now here.
Would the following naming changes 'flow' better?
Renaming Add root folder to Add folder
Renaming Add folder to New folder (and ditto with Add file)
Add root folder just sounds a bit scary to me ;P.
Also, I don't know if this is done in any other editors or even if it's possible, but I have a few projects that are completely identical in folder structure with only the files within the folders changing. In those cases, would it somehow be possible to combine the folders and display them as one?
@50Wliu Yeah, I agree with your naming suggestions. The New {File,Folder} bit is already done (at least in the context menu), but should probably rename the actual commands. And Add Root Folder does kind of makes it sound like you're adding /.
This might only be tangentially related but when I was trying out multi-folders, I was surprised the following state got saved.
Ran atom dir-a and added another root folder dir-b and closed atom again.
Ran atom dir-a again and it remembered the root folder that I added.
I wanted to figure out where it saved its state which led me to ~/.atom/storage where there are files named by the hash of the path that you were trying to open.
That might be quite opaque to the user.
Also, it might get complicated when atom dir-a dir-z would open folders in the same window.
In comparison, Sublime will - as far as I can tell - do the following:
Only save the state of the last window of the application globally, not per path.
@KeitIG @nikolaydyankov I believe it's because the rename operation may do something like atom.project.getDirectories()[0] to get the root path when building the final path.
when multiple paths are given to atom, all of them should be opened in a single window (works for files so far, not for folders)
right now it reacts really weirdly: opens given files in an existing window and opens a new window for each given folder
it's not obvious how it should be affected by --new-window (if should be)
when an external (for already open folders) file is opened using atom, its containing folder should not be added as a root folder, a folder can always be given explicitly, once the point above is implemented
@D-side I believe all of your suggestions are implemented in Atom's latest release. The multi-folder support from the CLI is hidden behind an undocumented feature flag: --multi-folder. Once all of Atom's bundled packages are updated to support multiple root folders, this flag will be removed and it's behavior will become the default.
If you're interested, please give atom --multi-folder a try. It'd be great to get your feedback on its behavior early.
When I rename myfile.js to something else, it goes in myrootfolder-1 root.
@KeitIG Thanks for the report. This is fixed on master. Also, if you find other bugs, please report them as their own issues so we can track them more easily.
@maxbrunsfeld okay, just installed the latest build. Yeah, great!
One thing is missing though, if --multi-folders is given a file, its enclosing folder is added too. Sometimes. Sometimes not. Failing to find the cause of this so far. The only clue I currently have is that if I open the first folder in Atom for the first time, enclosing folder is added.
UPD: hey, that's interesting. I may have found a bug. I was suspecting remember-session was messing with this, but apparently not, I've disabled it... Okay, a sequence to reproduce:
atom --multi-folder folder1 folder2/file
got a window with folder1 and folder2 and opened file
Remove folder1 from Atom
only folder2 left
Close Atom
atom --multi-folder folder1 folder2/file (once again)
expecting: folder1 and folder2
getting: only folder2 (folder1 is seemingly ignored since I removed it from Atom before)
workaround: remove all folders from root, close Atom, run that command again
Yeah @D-side I'm glad you brought that up. That's the current expected behavior, as our logic is currently very simple: window states are restored from the last window that was opened with the same combination of paths. I'd really like to get more people's feedback on this. Maybe there should be additional logic where we always make sure that all paths provided as arguments are added, even if they have been previously removed.
Persist combinations of root folders via an explicit project file, not based on which paths were originally opened
That would be amazing if all state was serialized into explicit project files (that could be implicitly created from the initial root folder).
A random idea — project sessions or "save points". It would allow you to save the state of the project, switch between states of a single project, etc. The use case would be to facilitate working on / reading two branches of a single repository at once.
@maxbrunsfeld CLI is expected to do what it's told to. Most of the time. If the state is saved, Atom should at least clarify, where.
+1 to @mehcode about explicit project files. That would at least make this behaviour controllable. The question is, where to put that project file.
Suggestion: don't save state implicitly, instead implement:
atom --make-project <project_file_path> [<paths>...]
Alt. suggestion: make a project implicitly and output the path to newly created file to stdout with a hint like:
$ atom --multi-folder something someotherthing
Created project file: something/project.atom
In general project files have a lot of potential. Storing project-specific data, for instance. Most of its applications can be easily worked around by third-party tools, but this is to be discussed by more people. I was initially thinking of build configurations, but switching to Guake is not that hard to make use of a /M|R|C/akefile or whatnot.
@michaelbahr92 That's not really related to this issue (which is concerned with multi-folder in the context of projects, i.e. multiple folders here means multiple project roots). However, there is an open PR on the tree-view package that implements (almost exactly) what you want: atom/tree-view#608
Hi,
I would like to suggest 'Close The Project' feature in atom. It would be like, clicking close the project, project won't be removed from workspace. If you want to work on it again, just double click on it, it will open(like in eclipse). It is very important because for operations like search,replace etc.. if all projects were included, it would affect the speed and time. I don't find similar feature in atom. I know 'Remove Project Folder' option is there. But, I have to add again if I need it.
is this feature listed in this thread?
It would be cool to be able to swap the projects: first place on third, third on first place. I need it because atom-stylefmt has an error associated with paths to the projects.
This issue has been automatically marked as stale because it has not had recent activity. Because the Atom team treats their issues as their backlog, stale issues are closed. If you would like this issue to remain open:
Verify that you can still reproduce the issue in the latest version of Atom
Comment that the issue is still reproducible and include:
What version of Atom you reproduced the issue on
What OS and version you reproduced the issue on
What steps you followed to reproduce the issue
Issues that are labeled as triaged will not be automatically marked as stale.
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!
Activity
winstliu commentedon Feb 25, 2015
I was too late to comment on the original tree view PR, but I guess I'll do so now here.
Would the following naming changes 'flow' better?
Add root foldertoAdd folderAdd foldertoNew folder(and ditto withAdd file)Add root folderjust sounds a bit scary to me ;P.Also, I don't know if this is done in any other editors or even if it's possible, but I have a few projects that are completely identical in folder structure with only the files within the folders changing. In those cases, would it somehow be possible to combine the folders and display them as one?
maxbrunsfeld commentedon Feb 25, 2015
@50Wliu Yeah, I agree with your naming suggestions. The
New {File,Folder}bit is already done (at least in the context menu), but should probably rename the actual commands. AndAdd Root Folderdoes kind of makes it sound like you're adding/.lee-dohm commentedon Feb 25, 2015
Mentioned this on Discuss.
wvanlint commentedon Feb 25, 2015
This might only be tangentially related but when I was trying out multi-folders, I was surprised the following state got saved.
atom dir-aand added another root folderdir-band closed atom again.atom dir-aagain and it remembered the root folder that I added.I wanted to figure out where it saved its state which led me to
~/.atom/storagewhere there are files named by the hash of the path that you were trying to open.That might be quite opaque to the user.
Also, it might get complicated when
atom dir-a dir-zwould open folders in the same window.In comparison, Sublime will - as far as I can tell - do the following:
martpie commentedon Feb 25, 2015
I noticed some bugs, not sure If I have to create a separate issue or if it is ok here.
nikolaydyankov commentedon Feb 25, 2015
@KeitIG
I have experienced the first issue, but I can't figure out what exactly is happening.
abe33 commentedon Feb 25, 2015
@KeitIG @nikolaydyankov I believe it's because the rename operation may do something like
atom.project.getDirectories()[0]to get the root path when building the final path.D-side commentedon Feb 25, 2015
My suggestions are related to
atomCLI helper:atom, all of them should be opened in a single window (works for files so far, not for folders)--new-window(if should be)atom, its containing folder should not be added as a root folder, a folder can always be given explicitly, once the point above is implementedmaxbrunsfeld commentedon Feb 25, 2015
@D-side I believe all of your suggestions are implemented in Atom's latest release. The multi-folder support from the CLI is hidden behind an undocumented feature flag:
--multi-folder. Once all of Atom's bundled packages are updated to support multiple root folders, this flag will be removed and it's behavior will become the default.If you're interested, please give
atom --multi-foldera try. It'd be great to get your feedback on its behavior early.maxbrunsfeld commentedon Feb 25, 2015
@KeitIG Thanks for the report. This is fixed on master. Also, if you find other bugs, please report them as their own issues so we can track them more easily.
D-side commentedon Feb 25, 2015
@maxbrunsfeld okay, just installed the latest build. Yeah, great!
One thing is missing though, if
--multi-foldersis given a file, its enclosing folder is added too. Sometimes. Sometimes not. Failing to find the cause of this so far. The only clue I currently have is that if I open the first folder in Atom for the first time, enclosing folder is added.UPD: hey, that's interesting. I may have found a bug. I was suspecting
remember-sessionwas messing with this, but apparently not, I've disabled it... Okay, a sequence to reproduce:atom --multi-folder folder1 folder2/filefolder1andfolder2and openedfilefolder1from Atomfolder2leftatom --multi-folder folder1 folder2/file(once again)folder1andfolder2folder2(folder1is seemingly ignored since I removed it from Atom before)maxbrunsfeld commentedon Feb 25, 2015
Yeah @D-side I'm glad you brought that up. That's the current expected behavior, as our logic is currently very simple: window states are restored from the last window that was opened with the same combination of paths. I'd really like to get more people's feedback on this. Maybe there should be additional logic where we always make sure that all paths provided as arguments are added, even if they have been previously removed.
mehcode commentedon Feb 25, 2015
That would be amazing if all state was serialized into explicit project files (that could be implicitly created from the initial root folder).
A random idea — project sessions or "save points". It would allow you to save the state of the project, switch between states of a single project, etc. The use case would be to facilitate working on / reading two branches of a single repository at once.
D-side commentedon Feb 25, 2015
@maxbrunsfeld CLI is expected to do what it's told to. Most of the time. If the state is saved, Atom should at least clarify, where.
+1 to @mehcode about explicit project files. That would at least make this behaviour controllable. The question is, where to put that project file.
Suggestion: don't save state implicitly, instead implement:
Alt. suggestion: make a project implicitly and output the path to newly created file to
stdoutwith a hint like:In general project files have a lot of potential. Storing project-specific data, for instance. Most of its applications can be easily worked around by third-party tools, but this is to be discussed by more people. I was initially thinking of build configurations, but switching to Guake is not that hard to make use of a
/M|R|C/akefileor whatnot.37 remaining items
thomasjo commentedon Oct 21, 2015
@michaelbahr92 That's not really related to this issue (which is concerned with multi-folder in the context of projects, i.e. multiple folders here means multiple project roots). However, there is an open PR on the tree-view package that implements (almost exactly) what you want:
atom/tree-view#608
I suggest you subscribe to that PR for updates.
tjkohli commentedon Mar 4, 2016
I second the comments about adding drag and drop of folders into a project.
lokesh1729 commentedon Sep 30, 2016
Hi,
I would like to suggest 'Close The Project' feature in atom. It would be like, clicking close the project, project won't be removed from workspace. If you want to work on it again, just double click on it, it will open(like in eclipse). It is very important because for operations like search,replace etc.. if all projects were included, it would affect the speed and time. I don't find similar feature in atom. I know 'Remove Project Folder' option is there. But, I have to add again if I need it.
is this feature listed in this thread?
redVi commentedon Oct 9, 2016
It would be cool to be able to swap the projects: first place on third, third on first place. I need it because atom-stylefmt has an error associated with paths to the projects.
grayghostvisuals commentedon Oct 18, 2016
I'd like to see what was said here but also allow project folders to be draggable into the atom editor at will
Ben3eeE commentedon Oct 26, 2016
atom/tree-view#525 just got merged which will allow you to rearrange project folders using drag and drop. Thanks to @forivall for this! 🎉 🎆
grayghostvisuals commentedon Oct 26, 2016
Thanks @forivall
stale commentedon Oct 26, 2017
Thanks for your contribution!
This issue has been automatically marked as stale because it has not had recent activity. Because the Atom team treats their issues as their backlog, stale issues are closed. If you would like this issue to remain open:
Issues that are labeled as triaged will not be automatically marked as stale.
lock commentedon Sep 2, 2018
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!