auto-save.nvim
auto-save.nvim copied to clipboard
Can't redo the changes after file saved
Config:
{
"Pocco81/auto-save.nvim",
debounce_delay = 1000,
config = function()
require("auto-save").setup()
end,
}
I can press u
to undo if I hold it for a while, but I can't press redo (ctrl + r) to get the previous changes
Yeah, I came here searching for a solution for undo.I have to press undo (u) about 10 times in a second for it to let me undo one thing
Please provide your exact config. The one posted by @belogermanotta clearly is not correct (the debounce_delay
key should go into the setup
function).
I have the same issue with undo. It seems to be an issue with autosave + auto format on save. For instance, deleting a line with dd
triggers autosave which triggers auto-format which triggers autosave. Then u
undoes the auto-format, but that also triggers autosave which re-triggers autosave. Something like that anyway.
It happens when deleting "world" from "Hello world", the "world" will be removed then saved then the space will be automatically removed then saved again. Is there a way to delay every save of 1s for example ?
I have the same issue with undo. It seems to be an issue with autosave + auto format on save. For instance, deleting a line with
dd
triggers autosave which triggers auto-format which triggers autosave. Thenu
undoes the auto-format, but that also triggers autosave which re-triggers autosave. Something like that anyway.
That makes sense, did you figure something out or just stopped using the plugin @SpacewaIker?
Ok, I basically switched to okuuva/auto-save.nvim
and now my undo/redo issues are gone, I'm using the lazyvim.org distro by the way, which autoformats by default (and I love it)