zed icon indicating copy to clipboard operation
zed copied to clipboard

Restarts should be non-destructive

Open porsager opened this issue 1 year ago • 3 comments

Check for existing issues

  • [X] Completed

Describe the feature

I think especially since we're on a mac, restarts ought to be non destructive. If I restart the app, everything ought to be in the same state once it opens. I think it is worth tracking this as a separate issue, as there exists many issues that cover parts of this, but it might be possible to fix them all in one fell swoop.

These are some of the features with existing issues that this covers.

Remember unsaved changes:

  • https://github.com/zed-industries/zed/issues/4683

Remember untitled files:

  • https://github.com/zed-industries/zed/issues/4985

Remember undo history:

  • https://github.com/zed-industries/zed/issues/4942

Remember window history:

  • https://github.com/zed-industries/zed/issues/5258

Remember sidebar size:

  • https://github.com/zed-industries/zed/issues/4910

Remember font size:

  • https://github.com/zed-industries/zed/issues/5380

Other features I couldn't find existing issues for

  • [ ] Remember terminal tabs including their cwd
  • [ ] Remember open tabs in windows
  • [ ] Remember folders opened in sidebar
  • [ ] Remember open panes in projects

porsager avatar Feb 05 '24 08:02 porsager

It is necessary to retain the state of the terminal

d1y avatar Feb 06 '24 18:02 d1y

More than the point Remember terminal tabs including their cwd ?

porsager avatar Feb 06 '24 18:02 porsager

Also necessary to retain the local config and not reset the file on each restart

https://github.com/zed-industries/zed/issues/7100

coratgerl avatar Feb 08 '24 08:02 coratgerl

Is there an issue tracking the fact that if I have multiple workspaces/windows open, when I update Zed and restart it will only re-open one of the workspaces? I often have multiple workspaces, so it's a bit annoying to update Zed knowing I have to manually re-open my projects.

jonathanpwang avatar Mar 11 '24 15:03 jonathanpwang

Is there an issue tracking the fact that if I have multiple workspaces/windows open, when I update Zed and restart it will only re-open one of the workspaces? I often have multiple workspaces, so it's a bit annoying to update Zed knowing I have to manually re-open my projects.

There was #5897, which was closed for another issue in the now archived feedback repository. It may have been lost in the repo migration. Perhaps reopening #5897 would make sense? @JosephTLyons

Moshyfawn avatar Mar 12 '24 15:03 Moshyfawn

Just to quickly explain what happened with the urls. The community repo used to be called feedback. At some point, we renamed to community and then later on, we migrated all the issues from community to zed once we went open source. If you see any urls pointing to feedback, they can be resurrected by updating them to point to community, and then GitHub will forward you to the migrated issue in zed.

  • https://github.com/zed-industries/community/issues/825

which redirects to:

  • https://github.com/zed-industries/zed/issues/5869

That being said, it looks like I closed that issue too - but I'm fine with reopening that if you want to.

JosephTLyons avatar Mar 12 '24 16:03 JosephTLyons

It would be great to reopen the other issue to track workspace serialization if that's still being worked on!

jonathanpwang avatar Mar 19 '24 04:03 jonathanpwang

I believe several of these are already implemented, particularly:

  • Remember terminal tabs including their cwd
  • Remember open tabs in windows
  • Remember folders opened in sidebar
  • Remember open panes in projects

I've checked them off and added a few other items that I'd like to get to :)

mikayla-maki avatar Mar 22 '24 19:03 mikayla-maki

I would vote for persistent terminal state too actually. If you run different processes in the terminal you will need to start them all again. For example you run a server application, ngrok and you have opened database client like psql. After restart you will need to run all this commands again. This makes the decision of restarting the editor computationally expensive for you brain. In vscode, you don't lose anything when you restart your editor. This forces me to use terminal outside of the zed editor or use tmux inside zed's terminal, although the terminal itself is really a good in my opinion.

The other think I noticed, is that when I restart it from command palette using command workspace: restart, it restart all opened projects. I failed to find the definition of the workspace in zed's docs, but either way I think it's confusing. If it must restart only the current project, it actually closing all opened projects but launching only the one from where you executed the command. If it must restart all the opened projects, then why it's not opening other projects that were open before restart?

That being said, the smoothness of the editor, to me is exceptional, I'm very thankful to all of the contributors.

hos avatar May 29 '24 08:05 hos

I don't know if this falls under this issue's purview, but I would like zed to reopen any opened files whether they are part of a project or not. I often have random files opened along with my project files; zed should not decide on its own that since those files aren't part of the project, I don't need them on restart.

thataboy avatar Aug 11 '24 21:08 thataboy