Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Zed configurable to behave like an "omni" editor instead of "project-centric" editor #18165

Open
1 task done
verybigelephants opened this issue Sep 20, 2024 · 6 comments
Labels
enhancement [core label] needs info / awaiting response Issue that needs more information from the user workspace Feedback for workspace management, layout, interactions, etc

Comments

@verybigelephants
Copy link

Check for existing issues

  • Completed

Describe the feature

First of all, i love Zed editor!

However, right now it is very "project -centric" and not being able to be used as a regular a swiss knife editor like for example Sublime - you open a workspace and are able to navigate files there. This is pretty awesome when you're developing one single project.

But there are scenarios when you simply don't follow this workflow. You open multiple files in different folders, different servers, etc. and work on a different paradigm rather than developing a single project.

It would be awesome if we were able to configure Zed to be used as a regular text editor when we're not forced to have a single "project" opened and edit files in there, but rather to use it as a universal editing tool and switch between open file tabs as we please.

Or am i missing something? Please forgive me my ignorance in case i have missed some program setting

If applicable, add mockups / screenshots to help present your vision of the feature

n/a

@verybigelephants verybigelephants added admin read Pending admin review enhancement [core label] triage Maintainer needs to classify the issue labels Sep 20, 2024
@notpeter
Copy link
Member

Perhaps I'm misunderstanding something but you can absolutely use zed as an editor of individual files without opening a specific folder as a project.

When I run the following: zed ~/.zshrc ~/Brewfile ~/.yarnrc I get a Zed window with three open tabs. If I subsequently run zed ~/.ssh/config I now have four open tabs.

Similarly, in my ~/.gitconfig I have the following to spawn Zed for editing my commit messages (remove the --new if you want to reuse the existing window):

[core]
	editor = zed --new --wait

Are there specific missing features that makes Zed difficult to use in this mode for you?

Obviously it could be better:

@notpeter
Copy link
Member

@notpeter notpeter added needs info / awaiting response Issue that needs more information from the user workspace Feedback for workspace management, layout, interactions, etc and removed triage Maintainer needs to classify the issue admin read Pending admin review labels Sep 24, 2024
@bilal-houari
Copy link

bilal-houari commented Sep 26, 2024

i think adding options for creating a file or open a folder without calling it a project would help. also by default zed always opens the most recent project and there is no clear way to close it and just have an interface where you can open files and folder.

i suggest adding something like the vscode welcome screen where there are the recently opened folders and options to create a new folder or file to work on.

image

@dzuelke
Copy link

dzuelke commented Sep 26, 2024

Note that the "there must be a project" assumption leads to other issues as well. For example, it's not possible to open a /dev/fd/… file using the zed CLI (in order to work around the inability to pipe input to the zed command) - that causes an error in worktree.rs.

@notpeter
Copy link
Member

there is no clear way to close it and just have an interface where you can open files and folder.

I think some of what you're experiencing are things that have been lost in translation when compared to the MacOS experience.

  1. New Window / New File actions are not exposed via the GUI menu on Linux (they are under the File Menu on Mac). You can use the command palette or keyboard shortcuts:

"ctrl-n": "workspace::NewFile",
"ctrl-shift-n": "workspace::NewWindow",

  1. MacOS applications can exist without a window, specifically you can close the last window and the menu bar remains available. As a result our behavior for workspace restoration on Mac is closer to what you might be expecting. If you Quit Zed, we restore any open workspaces. But if you close all Workspace windows and then Quit Zed, when you come back you are presented with an empty workspace with a single untitled buffer.

On Linux, we can't tell the difference between "Closing the last workspace window" and "Quitting Zed" because there's no way for Zed to be open without an associated Project window. Currently when you quit zed, we always restore the last closed project when you return. Ironically, VSCode has this behavior on MacOS too -- the only way to open to an empty workspace (Welcome landing page) is to have close your project window, then open a new window with an empty workspace, then quit and you'll get the empty/welcome workspace start (same as Zed on Linux).

  1. We currently have a welcome screen, but it's geared towards first open, not as a landing page for a seasoned user. I think having a welcome page which focused on the returning user is a reasonable request and there has been previous design work on this.

I'm not sure the right answer as for how to differentiate between the user's intent to "close zed" (should restore project) or "close project" (should not restore) on Windows and Linux when spawned from the graphical environment.

A workaround in the meantime is to spawn zed from the cli with zed -n:

  -n, --new
          Create a new workspace

@jansol
Copy link
Contributor

jansol commented Sep 28, 2024

I'm not sure the right answer as for how to differentiate between the user's intent to "close zed" (should restore project) or "close project" (should not restore) on Windows and Linux when spawned from the graphical environment.

My 2c:

  • if zed was launched with one or more files (but no directories!) given as arguments, it's not a project and should not be saved in recent projects nor restored automatically
  • if the arguments are directories, it should be treated as a project
  • I'm a bit torn on what I'd expect to happen with a mix of files and directories as arguments
  • when starting without any arguments I would expect to see the welcome screen (or the last project depending on settings)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement [core label] needs info / awaiting response Issue that needs more information from the user workspace Feedback for workspace management, layout, interactions, etc
Projects
None yet
Development

No branches or pull requests

5 participants