Multiple root folders!


#1

Wow, I’m amazed nobody made a huge fuss about this. It’s a major feature and I just stumbled into it yesterday:

That makes life so much easier! I bet it messes up some git integration packages like git-controle, but it makes me super happy. Such a time saver as well, with opening new windows still being sluggish.


#2

How do you open a new project into the same window as shown in the screenshot?


#3

Right-click in the tree view and select Add Root Folder, I think.


#4

Yeah, that’s it.

Some packages don’t really deal with this though, perhaps that’s why it’s a bit under the radar for now.


#5

None of mine do. For some time I’ve called the plural version of getRoots but just used the first root, [0], in the array that was returned. Core code did the same thing.

But this is more of a problem than just “fixing” the code. In many cases the logic of the app operates on the tree and will have to be tweaked to understand more than one. At least the old app doesn’t break. It just operates on the first root.

I have given it much thought yet. The last couple of months I haven’t had time to work on any new packages because it has been a full-time job keeping up with all the core changes and deprecations. I knew when I started working with Atom there’d be a lot of changes but the pace has gotten ridiculous as they approach 1.0.


#7

It’s true. I don’t have many packages out and most of my stuff is stylesheets, but I’m feeling it. Just working out the deprecations and working with the api changes is a lot of work. I had to completely rewrite everything that did any kind of dom manipulation. So, I can totally see how this change to the tree has major impact. Even though it was an expected change there’s really no way to prepare for that until it’s there.
I’m not really complaining though, the development pace of the core team is awesome to behold, and it’s to be expected. It’s just that if you put something out, be prepared to work on it at least every month to keep it from breaking. You’re not “done” until Atom 1.0 is released.


#8

Nirvana. There will never be another change to core. (grin)


#9

I was looking around for this feature. And found this thread.

However, I don’t seem to have the option ‘Add Root Folder’ when I right click the tree-view. I’m on Linux (ubuntu), running version 0.184.0.


#10

@noseglid Do you see it in safe mode (atom --safe)? I know there’s at least one package that disables and replaces tree-view with its own outdated version, so that could be it.


#11

@mnquintana That’s exactly it! Turns out the culprit was sublime-tabs! Thanks!


#12

I use sublime-tabs and can have multiple folders. Maybe something has changed recently.


#13

Thanks a lot , i am also looking around why it don’t work , and found out why thanks to you.
Saved a lot of time.!


#14

What version of atom?
I am at 189 (not from git) but do not work.


#15

Did they remove this in Atom 1.0.0?


#16

No, it should still be there in v1.0.0


#17

The commands are Add Project Folder and Remove Project Folder now