zed
zed copied to clipboard
Multiple projects in one window
Check for existing issues
- [X] Completed
Describe the feature
In VSCode I usually have multiple projects open at the same time, and it's convenient for me to have them all in one window. In VSCode I use the New Window Tab command to open native macOS tabs:

Would be great to have a solution for this in Zed (doesn't need to be native window tabs)
If applicable, add mockups / screenshots to help present your vision of the feature
No response
If you right click the project menu, you can add folders to the root level of the workspace. I think it is our equivalent of adding multiple projects to one window. Does this cover your needs?
VSCode does have that too, but unfortunately it's not ideal for me because it mixes up the editors/terminals of different projects
Ah ok, that makes sense, having tabs would be like having entirely new workspace windows, but in a single unified window, which would keep terminals separated. That makes sense.
I believe this is called native tabs in macOS. You can enable the desired behaviour for macOS (which vscode respects) in Settings > Desktop & Dock > Windows > Prefer tabs when opening documents = Always
This is a must have for myself. My brain works much better with less cluster contained into different windows when moving across projects.
This is currently one of two deal breakers for me (the other one is language support, but that is fixable), so I would love to see it supported 🙂
@andrewthauer yes that is correct, but Zed currently doesn't respect this and still gives you separate windows.
I read this, after checking out the VS code source: https://worthdoingbadly.com/vscodetabs/. If that is of any help to the devs. Unfortunately neither OS X coding or Rust is in my toolset, so I can't PR this one ...
I also love this feature of VSCode and have been hoping for its addition in Zed ever since I downloaded it. It has been a while so I wanted to give it a go myself.. forewarning I have never used Rust before and am very unfamiliar with the Zed codebase
After finding this stack overflow answer: https://stackoverflow.com/questions/48254397/nswindow-controlling-multiple-tabs/49832441#49832441
Led me to this: https://developer.apple.com/documentation/appkit/nswindow/1644729-tabbingmode?language=objc
The values for that enum seem to be:
Automatic = 0
Preferred = 1
Disallowed = 2
So I added the line
let _: () = msg_send![native_window, setTabbingMode: 1];
at line 629 of:
crates/gpui/src/platform/mac/window.rs
Which resulted in this:
A bit ugly, but it works! My naive solution for this was to just add some arbitrary padding to the title bar at crates/title_bar/src/title_bar.rs. However when there is only one tab in a window it looks pretty bad.
Here is the final result with multiple tabs in one window, I am able to click in each to open them, I can open files, create a terminal etc and it all seems isolated:
Seems like a pretty basic change that is well supported by the OS, it also unlocks these native options at the bottom in window:
I am also able to drag the tabs to join Zed windows together
Hopefully someone more familiar with Rust and Zed code can help to give support for this feature with more polish
For reference I also saw this related issue https://github.com/zed-industries/zed/issues/7136
This and better git support are the 2 blocker keeping me to switch my workflow entirely to zed
Adding more folders to the existing workspace isn't ideal, because now all document search and everything is mixed up You can't bounce between workspaces using a single unified window (like you can on neovim, emacs, etc) I work with multiple repositories every day, I was very excited with Zed but I can't be cmd + ` several times every time I need to find my other workspace. I would expect to hit a cmd, type the name and select from a dropdown or something