‹ 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. jeremyjh · · focus · HN ↗
      It is insane that people are defending behavior that is clearly abhorrent just because they like the software. Are the claims even true? If they are, you should be updating your opinions about the person writing this software.
      1. dlisboa · · focus · HN ↗
        Insane? Abhorrent?

        Relax for a second. Get some perspective.

        1. jeremyjh · · focus · HN ↗
          My perspective is that the Neovim maintainer implemented a change that would delete data created by another program on other people's computers. They knew this would happen in advance, and it was done anyway.
          1. em-bee · · focus · HN ↗
            vim and neovim have different defaults for the undo file, if neovim overwrites a vim file then it can only be because the user changed the paths for both to be the same. in that case neovim had no way of knowing that the file was used by another program.
            1. kelnos · · focus · HN ↗
              AFAICT neither has any default for `undodir`; the user must set it explicitly. I think a user could be forgiven for assuming that it was fine to use the same value when trying out a migration from vim to neovim, and that neovim wouldn't actively delete vim's state data.

              Sure, maybe they should have backed it up or used a different directory, but I think it's reasonable to expect that many people wouldn't. If a software developer is only going to consider the scenario where their users are thinking/behaving exactly as they are, then they aren't particularly good at what they're doing.

              1. em-bee · · focus · HN ↗
                vim: Undo files are normally saved in the same directory as the file

                neovim: by default they are saved to the dedicated directory in the application data folder

                I think a user could be forgiven for assuming that it was fine to use the same value when trying out a migration from vim to neovim

                neovim would also overwrite its own old version of the file. the point is that the expectation that neovim should watch out for files that are used by other applications is in my opinion not reasonable. it won't even watch out for its own old undo files.

                users may have the expectation that neovim and vim are compatible, but that expectation is simply not entirely fulfilled. you can't share config files unless you have some minimal ones that just happen to work. so why would you be able to share other files?

                the question is, how are these expectations formed, and what is reasonable to expect?

                when it started out neovim was very compatible with vim. but from my experience with FOSS and based on the stated goal of neovim at least to me it was clear that compatibility was not going to last. not everyone shares that experience, and thus their expectations are different. neovim should perhaps make that more clear and for one be aware that people expect compatibility and warn users accordingly. an argument could be made that if a user changes the undodir value, there is a higher chance that they may try to use the same for vim. but then vim devs would need to do that too.

                but does not considering that make devs not good at what they are doing? i don't think so. for one, if someone thinks the devs are not good enough they should stop using neovim (as some people here in the thread announced they are doing. their choice). personally i think this is average for FOSS and good enough. we can't expect everyone to be perfect. the correct response to an issue besides reporting it is not to complain but to contribute a fix.

          2. zeratax · · focus · HN ↗
            that's not what is happening here though?

            <a href="https:&#x2F;&#x2F;github.com&#x2F;neovim&#x2F;neovim&#x2F;pull&#x2F;13973#issuecomment-879067052" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;neovim&#x2F;neovim&#x2F;pull&#x2F;13973#issuecomment-879...

            &gt;&gt; It shouldn&#x27;t overwrite an unreadable file tho, unless I have completely misread the code.

            &gt; It doesn&#x27;t, but because it reads the vim-specific config file from the vim-specified location it then writes a file in that location with the name that vim expects, so files that I first edited in neovim ended up with undo files that vim couldn&#x27;t read and vice versa. Both programs complained.

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.