‹ BackHN Continuity

Thread

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

384 points · 346 comments · jandeboevrie

  1. gavinhoward · · focus · HN ↗
    As a Neovim user, this stopped me dead with painful realization: I may have suffered the same thing but didn't realize it. There was a time when I could not undo something, and it was after a Neovim upgrade.

    Unlike Dr. Chisnall, I started my editor journey on Neovim, so it wasn't a transition that bit me. However, if the format of the persistent undo file is unstable, and Neovim just deletes it when it doesn't recognize the previous format, then it seems conceivable (to me) that an upgrade after changing the format would delete the file too.

    Ouch. This is making me think about getting off of Neovim. Yes, FOSS comes as-is, but if there's an alternative...

    1. cdmckay · · focus · HN ↗
      It’s such an odd design decision.

      I could see ignoring the old undo data or warning before discarding it but just silently wiping it is so user hostile it’s hard to comprehend.

      1. loeg · · focus · HN ↗
        If you ignore it, do you continue allowing edits to the file? Now undo history is corrupt and useless anyway. Or do you disallow editing until the user manually deletes some hidden, implementation-detail file for a feature they probably never use?
        1. xoa · · focus · HN ↗
          If making a breaking change to the format of the file, why in root's name would neovim not just make its own new file!? Import the vim version if that's desired into persistent-undo.neovim and then just go from there. I don't understand their choice here at all nor why you're acting like this is complicated or there was some need for them to reuse the exact same file as vim?
          1. [deleted] · · focus · HN ↗

            [deleted]

          2. bot403 · · focus · HN ↗
            To support you further, why would neovim users have any illusion there would be cross compatibility between undo files? Separate undo files seems the obvious and expected choice.
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.