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

Can't redo the changes after file saved #70

Open
belogermanotta opened this issue Feb 1, 2023 · 6 comments
Open

Can't redo the changes after file saved #70

belogermanotta opened this issue Feb 1, 2023 · 6 comments

Comments

@belogermanotta
Copy link

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

@mslauson
Copy link

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

@primeapple
Copy link

Please provide your exact config. The one posted by @belogermanotta clearly is not correct (the debounce_delay key should go into the setup function).

@SpacewaIker
Copy link

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.

@lunics
Copy link

lunics commented Jan 30, 2024

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 ?

@linkarzu
Copy link

linkarzu commented Jun 8, 2024

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.

That makes sense, did you figure something out or just stopped using the plugin @SpacewaIker?

@linkarzu
Copy link

linkarzu commented Jun 8, 2024

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)

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