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

Option for auto-add edit after x amount of time #9

Open
rk-kontur opened this issue Aug 31, 2023 · 1 comment
Open

Option for auto-add edit after x amount of time #9

rk-kontur opened this issue Aug 31, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@rk-kontur
Copy link

This option would allow the plugin to automatically create an edit after a chosen time.
So, in case I set this to 60 minutes: if I write for 30 minutes and then pause for 60 minutes, the edit created in dropdown would be lateron created with the timestamp of the last writing action.

In some way, it is quite the opposite of the "Minimum second between edits" function. But my suggestion focuses on creating edits along the lines of actual editing actions and does not postpone them to another future edit, merging two actions that might be far apart in time.

@antoniotejada
Copy link
Owner

I think what you suggest would be better implemented as "only create a new edit after X seconds of inactivity" (using a fixed interval like you suggest would still split edits that were done close in time). The benefit being, as you mention, that edits that were done close in time will be saved together, since the current scheme can merge edits that were done far apart in time.

One problem is that Obsidian only calls the change event once the text has been changed, which means that the "far apart edit" has already been done and the previous diff cannot be calculated. This means the implementation would actually be something like "merge the current edit with the previous one if done in less than X seconds apart, otherwise create a new entry".

That's something I also wanted to do and I think it could work.

@antoniotejada antoniotejada added the enhancement New feature or request label Aug 31, 2023
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

2 participants