-
Notifications
You must be signed in to change notification settings - Fork 58
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 request: set delay before autosaving #61
Comments
I think I might be able to implement this with an autocommand that emits a custom event after a given delay when it receives a triggering event. If somebody has any better ideas I'm all ears. |
This is a problem with vim.api.nvim_create_autocmd("BufWritePre", { Ideally, we could get some sort of grouping mechanism for these "auto-whatever" plugins, but as a largely enthusiast group of authors, it's not easy to synchronize. |
That is indeed a problem with |
It would be nice to be able to set a delay before autosave is run after receiving trigger event.
Use case: I use tidy because cleaning up trailing whitespaces is a task best left to automation. Using tidy with auto-save.nvim makes pasting stuff from registers at the end of line / file hard because file is automatically saved (and thus cleaned of traling spaces / lines) immediately after exiting insert mode.
Setting
debounce_delay
doesn't help because if I understood it correctly it only prevents the same buffer getting saved multiple times during the given time frame and it still saves the buffer immediately if it hasn't already been saved during that time frame.The text was updated successfully, but these errors were encountered: