‹ BackHN Continuity

Thread

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

384 points · 346 comments · jandeboevrie

  1. dlisboa · · focus · HN ↗
    > the attitude that just because something is a persistent file on your filesystem that contains data that you might want is no reason for their program not to delete it meant they had no concept of a duty of care to their users.

    That's the wrong way to look at it. NeoVIM has a different concept of care for their users. They're optimizing for another kind of care, more in line with modern expectations, which VIM did not care about (hence the fork).

    It's not better or worse, just different.

    This same article could've been written about how VIM has no native LSP integration or autocomplete and they don't have duty or care for their users.

    1. pdonis · · focus · HN ↗
      Deleting important data without warning is not the same as not providing a feature users might want.
      1. crote · · focus · HN ↗
        It's a feature most software doesn't even have, and it is off-by-default. If you rely on your undo history to store "important data", you are doing something horribly wrong - to the level of storing your critical emails in the Trash folder.

        Persistent undo exists to recover from an accidental write-and-quit mid-session nuking some stuff you really didn't intend to delete. If you care about its contents beyond a handful of hours, you either need to adopt proper version management, or start making backups.

        Reading the PR the change was needed because the old undofile format was fundamentally broken. They considered making an undofile-upgrade mechanism, but it would've caused more issues that it would've solved. In other words: stuck between a rock and a hard place.

        A duty of care also means occasionally having to break things to make it better, or else you end up being stuck with spacebar heating[0] forever. As a user it does suck, but that's the price you have to pay for using actively-developed software.

        [0]: <a href="https:&#x2F;&#x2F;xkcd.com&#x2F;1172&#x2F;" rel="nofollow">https:&#x2F;&#x2F;xkcd.com&#x2F;1172&#x2F;

        1. pdonis · · focus · HN ↗
          &gt; Persistent undo exists to recover from an accidental write-and-quit mid-session nuking some stuff you really didn&#x27;t intend to delete.

          That&#x27;s one use case, sure, but not the only possible one.

          &gt; Reading the PR the change was needed because the old undofile format was fundamentally broken.

          That&#x27;s a good reason to have a new undo file that&#x27;s completely separate from the old one, and use the new one instead, and tell users &quot;Hey, whatever undo information you had in your old undo file isn&#x27;t accessible any more through neovim, you&#x27;ll have to use vim if you need to get to it.&quot;

          It&#x27;s not a good reason for just deleting the old undo file with no warning. All the new version needs to do is ignore it, not nuke it.

        2. applfanboysbgon · · focus · HN ↗
          &gt; It&#x27;s a feature most software doesn&#x27;t even have

          &quot;All software should be shit because most software is shit&quot;

        3. soraminazuki · · focus · HN ↗
          User data shouldn&#x27;t be silently deleted just because you think they aren&#x27;t worthy enough. Especially when the name of the feature, persistent undo, and the docs explicitly promise that the edit history will be preserved.
          1. xigoi · · focus · HN ↗
            The user data in question lies in ~&#x2F;.cache, which is a directory for files that aren’t meant to last long.
            1. soraminazuki · · focus · HN ↗
              That&#x27;s completely false and also irrelevant to the point I made. Even if true, it doesn&#x27;t justify deleting user data in direct conflict with what the docs say.

              <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=49869740">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=49869740

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.