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

Feature: Hot exit (persist unsaved changes on quit) #639

Open
bryphe opened this issue Aug 11, 2019 · 0 comments
Open

Feature: Hot exit (persist unsaved changes on quit) #639

bryphe opened this issue Aug 11, 2019 · 0 comments
Labels
A-other Area: Other, does not fit in any of the other buckets enhancement New feature or request I-daily-editor-blocker An issue blocking use of the editor as a day-to-day editor

Comments

@bryphe
Copy link
Member

bryphe commented Aug 11, 2019

This is related to the following issues:

Prerequisities:
#610
#600

Once our 'quit' lifecycle is refined (ie, we're handling unsaved changes correctly...) - I'd like to add another layer in terms of "hot exit".

Hot exit would work as follows:

  • Persist the swapfile for active, unsaved buffers
  • Persist the undofile for all open buffers for persistent undo

On quit, we'd save all the relevant swap files in the Onivim folder, and reference them via a configuration file (workspace.json). When we load, we'd check and see if there was an active workspace.json, activate it (ie, populate the splits as before), and then load the swapfiles and undofiles for buffers as we load them.

Essentially - it'd just act as a convenient, automatic way to reuse the swapfiles & undofiles that Vim already has for this sort of persistence.

Some open questions:

  • What new APIs would we need for libvim? Would we want an explicit API to save / load swapfiles and undo files, or just point to a per-directory workspace?
@bryphe bryphe added I-daily-editor-blocker An issue blocking use of the editor as a day-to-day editor enhancement New feature or request labels Aug 11, 2019
@glennsl glennsl added the A-other Area: Other, does not fit in any of the other buckets label Nov 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-other Area: Other, does not fit in any of the other buckets enhancement New feature or request I-daily-editor-blocker An issue blocking use of the editor as a day-to-day editor
Projects
None yet
Development

No branches or pull requests

2 participants