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

FR: Persistent Undos #3

Open
chrisgrieser opened this issue Aug 1, 2023 · 2 comments
Open

FR: Persistent Undos #3

chrisgrieser opened this issue Aug 1, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@chrisgrieser
Copy link

One pretty awesome feature that I know from a different app (vim) is the concept of so-called persistent undos, which could be an interesting feature for this plugin.

The idea is you make your undo history persist across sessions by storing them in edit history files, not too dissimilar from this plugin. Based on this plugin's settings, the granularity of undos would get lost, but it's still a big plus compared to not having anything.

Basically, what this plugin would have to do is somehow "hook into" Obsidian's ctrl-z (or cmd-z) when Obsidian reaches the end of its own undo history.

@antoniotejada
Copy link
Owner

antoniotejada commented Aug 1, 2023

Haha great minds think alike.

There's a todo about that in the code:

// XXX Feed the editor undo stack with the contents of the history file? (could
//     be done without private apis by inserting the text in edit history order at file
//     load, will probably need a flag to prevent from storing double history)

https://github.com/antoniotejada/obsidian-edit-history/blob/6d55e99c4ff098d8a9ec2e5dbe5d56420278a7f4/main.ts#L71C1-L73C79

Leaving open to consider implementing.

@antoniotejada antoniotejada added the enhancement New feature or request label Aug 1, 2023
@Archie-2021
Copy link

Yeah , such a feature is very needed. I think using something like git for obsidian is a overkill and unnecessarily complicated. Also I would like to see some features like undo-tree plugin for vim in obsidian.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants