0

If you have opened a folder, opening additional files outside the tree should utilize a new window.

Alice Bevan-McGregor 6 years ago • updated by Pieter Kubben 6 years ago 6

Use case: open one project tree in a window.  Then using Finder or Terminal manually open a file from outside the active directory tree.  This "foreign" file will be opened in the same window.  This can get confusing fast.


Here's a video.

Regarding the video: if you had double-clicked the file "setup.py", it would have stayed open and it probably wouldn't have been so confusing. Doing a single click opens it "transiently" so that you can quickly navigate a folder without opening many tabs. The transient tab is closed as soon as you open another file.


I like to work with only one window, so maybe it should be added as an option. I'm not sure how to name that option though. "If you have opened a folder, opening additional files outside the tree should utilize a new window." is a bit long :)

By the way: that kind of feedback is very helpful. I had to make some decisions when implementing the sidebar and it's good to know how other people would like the app to behave.

The difficulty isn't that the original (single-click) file goes away, it's that a file from an entirely different directory tree was opened in the same window.  I'm aware of the double-click persistence.  "Open files outside active directory tree in new window."

I'll see what I can do. Maybe this should be the default behavior. I think TextMate does it that way.


Currently, you can do a right-click on the tab and select "Move Tab to New Window". This options only appears when you have at least two tabs in the window though.


What about folders? Is it ok that a folder is added to sidebar in the current window?

That latter point is also dubious.  Now that I know that adding a folder adds to the current window's side-bar, and that I can right-click to extract that subtree into its own window, I've got less of an issue.  You'll notice in my original video that the newly opened file does not get added to the side-bar.


However, by opening multiple (potentially very disparate on-disk) trees in the same window you may run into problems in the future if/when you try to implement project-like features.  Managing a virtual filesystem of project structure separate from (and potentially unrelated to) on-disk structure the way Xcode does is a headache.

I had the same problem and after reading these comments, I kind of like the approach you take. Still it is not intuitive, so maybe you should use something like Cmd + click for that.