zed icon indicating copy to clipboard operation
zed copied to clipboard

Preserve untitled files for next time

Open assayire opened this issue 2 years ago • 4 comments

Check for existing issues

  • [X] Completed

Describe the feature

As a Zed lover, I want Zed to not ask to save/delete untitled files when quitting the app but preserve them as is, and have them available for me to work on next time I open zed.

PS: Feature can be tried out in Sublime Text and couple of other editors.

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

No response

assayire avatar Feb 28 '23 02:02 assayire

Very much miss this feature, but one super important thing - if it is added - is absolute certainty that you won't loose content in these "unsaved buffers/documents". Once you start relying on this feature it's an extremely great way to keep notes / snippets, etc, but it needs to be something you can trust. I have 9 year old unsaved content in Sublime, which I'd love to move over, but I don't want to risk loosing them (happened a couple of times in the good old textmate days during an upgrade).

porsager avatar Feb 05 '24 07:02 porsager

Agree, this is without a doubt a feature I can't migrate to Zed from Sublime without.

jacksongoode avatar Mar 15 '24 18:03 jacksongoode

+1 Looking forward to having this feature on Zed. This is the one that stops me from migrating from VSCode.

Parithi avatar Mar 26 '24 21:03 Parithi

Cat sat on my power button and force quit everything. Lost an hour or so of writing.

Hopefully the feature will save me next time.

ddegner avatar Apr 14 '24 02:04 ddegner

Just ran into this issue and was very upset. Zed. Please. Since Atom stopped development, I haven't migrated to another text editor but you were SUPPOSED TO BE THE ONE!!

akano-su avatar Apr 26 '24 04:04 akano-su

Chiming in on this - this would allow users to use new tabs for notes. It would be immensely helpful.

NicolayD avatar May 23 '24 10:05 NicolayD

It looks like this is in progress. Any idea of a timetable we'll see this ready? I also think a lot of us are waiting for this to really kick Zed's tires.

ylluminate avatar May 26 '24 06:05 ylluminate

+1 for this.

rgilbert82 avatar May 26 '24 15:05 rgilbert82

Chiming in - this is the only thing stopping me from uninstalling Sublime and fully making the switch.

selfish avatar Jun 09 '24 16:06 selfish

I was just about to raise this issue too. All major editors like VS Code and Sublime preserve unsaved files. Zed should do the same, especially considering its frequent updates that require restarts.

mileusna avatar Jun 13 '24 18:06 mileusna

Cat sat on my power button and force quit everything. Lost an hour or so of writing.

Hopefully the feature will save me next time.

Bug fixed. The cat has a new home.

ddegner avatar Jun 15 '24 02:06 ddegner

I would love for this feature to be added. It's more than just a convenience, it's practically a whole lifestyle.

MemeKing avatar Jul 11 '24 02:07 MemeKing

A first version of this has been merged: https://github.com/zed-industries/zed/pull/13546

It'll go into Preview release this week, on Wednesday. Stable release next week, pending any bug fixes or revision.

Please see the constraints in the pull request description that apply to this version.

mrnugget avatar Jul 22 '24 07:07 mrnugget

The cat will be allowed back inside.

https://github.com/user-attachments/assets/cd68f5ae-52a4-4eaa-a6a8-963399011478

ddegner avatar Jul 22 '24 21:07 ddegner

The following PRs have added quite a bit to the workspace serialization story:

  • https://github.com/zed-industries/zed/pull/13546
  • https://github.com/zed-industries/zed/pull/14965

There are a few known missing bits here, but I think its best that we close this issue out, in favor of new issues that describe those missing bit, so that we can get a clear understanding of how important these bits are to you all, now that most of the functionality has landed. Here are the new issues (upvote via 👍):

  • https://github.com/zed-industries/zed/issues/15098
  • https://github.com/zed-industries/zed/issues/15097

Killer work @mrnugget!

JosephTLyons avatar Jul 24 '24 16:07 JosephTLyons

Thank you @JosephTLyons! I understand the decision to close that issue. With that I think it's important to mention that #15098 is actually the main reason this feature is so desired. Open a new buffer, type something in, and just know it won't be lost.

selfish avatar Jul 24 '24 22:07 selfish

Thank you @JosephTLyons! I understand the decision to close that issue. With that I think it's important to mention that #15098 is actually the main reason this feature is so desired. Open a new buffer, type something in, and just know it won't be lost.

Note that this will work right now (in today's preview release) if you are opening an untitled buffer and there's a worktree in your project panel.

https://github.com/user-attachments/assets/61345285-1b99-41c8-a805-9ce1ba697458

The only case in which this doesn't work is if you open up a brand new instance of Zed, one that has no projects in it, and then open a new file. I think we definitely want that, but I think a lot of the headache (80 percent or more) has been addressed by @mrnugget's PRs.

JosephTLyons avatar Jul 24 '24 22:07 JosephTLyons