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

Is there a way save a file after n number of milliseconds even if the file is modified. #64

Open
PiyushDuggal-source opened this issue Nov 3, 2022 · 5 comments

Comments

@PiyushDuggal-source
Copy link

No description provided.

@wildwestrom
Copy link

I second this. I think there should be a little wait time before auto saving.

@okuuva
Copy link

okuuva commented Feb 12, 2023

Maybe a duplicate of #61?

@jayboss222
Copy link

Upvote from me

@primeapple
Copy link

Unsure, what this is about. Could you better describe what you want? It may be fixed within the maintained fork https://github.com/okuuva/auto-save.nvim
Please open issue there

Disclaimer: I'm the co-author there.

@chintzyy
Copy link

_The auto-save plugin should feature a debounce mechanism when saving files upon exiting insert mode (or any given trigger events). Currently, it saves after each change, which can be excessive during rapid edits. This debounce would delay saving for a brief period, such as one second, after the last exit from insert mode.

This feature would be particularly valuable in situations where hot reloading is utilized, or when file updates trigger browser page refreshes. By introducing a debounce for file saving, it would reduce unnecessary disk writes and potentially improve performance, especially in environments with frequent file modifications._

@primeapple, Nice! Looks like your forked implemented of auto-save has implemented the above feature request as defer_save.
Implementing the defaults automatically does indeed defer the file save, great work. I'll leave my comment here for posterity, in case others come across this requirement

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

No branches or pull requests

6 participants