‹ BackHN Continuity

Thread

On caring for user data: NeoVim caused Vim undo files to be deleted

384 points · 346 comments · jandeboevrie

  1. gchamonlive · · focus · HN ↗
    Am I missing something? Are people using persistent undo as backup?

    This seems however more like of a documentation and UX problem. Neovim should warn and ask before deleting old undo files, or at least back them up, but it's not neovim's fault if people don't use reliable backup and versioning systems. Relying on persistent undo for this is kind of a self inflicted wound.

    Use the proper tools for the job. Saying that neovim developers "had no concept of a duty of care to their users" is really disrespectful. Neovim's Lua API is overflowing with care, you just need to go look.

    1. sdorf · · focus · HN ↗
      I've always assumed that undo history is ephemeral in any application I use, other than maybe an application where history is first-class in a timeline like Fusion360. I'm surprised to hear that people rely on it being persistent.
      1. delecti · · focus · HN ↗
        > I'm surprised to hear that people rely on it being persistent.

        The feature's name has "persistent" in it.

        1. endospore · · focus · HN ↗
          It's more persistent than a session but that's it; (n)vim itself resets it from time to time as long as the file is changed without a edit in vim.

          For example applying the recover file (well it's a huge pitfall in vim on its own) resets not only the current undo history but also the "persistent" one.

          1. pas · · focus · HN ↗
            they use "autoread" to work around that (but it requires vim to be running and the given file open if I understand correctly)

            <a href="https:&#x2F;&#x2F;infosec.exchange&#x2F;@david_chisnall&#x2F;117172481079439378" rel="nofollow">https:&#x2F;&#x2F;infosec.exchange&#x2F;@david_chisnall&#x2F;117172481079439378

        2. pas · · focus · HN ↗
          it doesn&#x27;t have &quot;durable&quot; though :)
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.