zed icon indicating copy to clipboard operation
zed copied to clipboard

How to automatically open the last file after restarting zed ?

Open arfbt opened this issue 9 months ago • 2 comments

Check for existing issues

  • [ ] Completed

Describe the feature

How to automatically open the last file after restarting zed ? When I reopened zed, it went blank. That's too bad.

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

No response

arfbt avatar May 16 '24 00:05 arfbt

Huh - that is odd. Zed should be serializing out which files are open per project and should be reopening the last opened project, when opening the app. Could you send a screen video that shows:

  1. Opening Zed
  2. Opening a projeect
  3. Opening a file
  4. Close Zed
  5. Opening Zed again

JosephTLyons avatar May 16 '24 13:05 JosephTLyons

Thank you very much for your explanation. I have tried it, and everything works fine when I open the project with Zed. However, if I open an individual file, then after restarting Zed, the file will not be reopened.

arfbt avatar May 17 '24 03:05 arfbt

@JosephTLyons

I too experience this the latest preview (Zed Preview 0.139.3) for individual files.

(It doesn't matter if I have 1 or 100 individuals files open. If I restart Zed, it's a blank slate and doesn't re-open any files I previously had open).

FYI - there a lot of bugs that aren't experience when in Project View but are experienced when in Opening Individual Files view.

Like this bug report.

Here is another bug that isn't experienced in Project View but is experienced in Individual File view.

michealp-coder avatar Jun 07 '24 19:06 michealp-coder

@JosephTLyons

Any updates on this ticket?

michealp-coder avatar Jun 13 '24 12:06 michealp-coder

Video can be seen here: https://github.com/zed-industries/zed/issues/5258#issuecomment-2012187539

@JosephTLyons any updates. Video of the big is linked above.

michealp-coder avatar Jun 17 '24 14:06 michealp-coder

@michealp-coder Currently Zed only restores open files that are within an open workspace/project folder.

I believe this is an enhancement which would address your request:

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

Although your issue is older I'm going to close this in favor of that one because it has more upvotes. Thanks for reporting.

notpeter avatar Jul 31 '24 14:07 notpeter