‹ BackHN Continuity

Thread

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

384 points · 346 comments · jandeboevrie

  1. fooblaster · · focus · HN ↗
    How does one use persistent undo in vim?
    1. fooblaster · · focus · HN ↗
      Talk about poor duty of care to users... been using him for 20 years and I have to enable it in my vimrc to take effect. So stupid. Why would I want this to be off?

      Such amazing design...

      " Enable persistent undo set undofile

      1. oblio · · focus · HN ↗
        Emacs and Vim are basically like that.

        They have very vocal and entrenched users so that practically no defaults can be changed lest the single Amiga user will start a huge uproar.

        And since they don't really have a BDFL or commercial pressure, they can be super detached even from standards or expectations that appeared 40 years ago.

        Neovim was basically a reaction to that, for Vim, where they updated defaults to stuff basically every Unix editor since 2005 has.

        1. tommyage · · focus · HN ↗
          Maybe neovim should advertise like: Your fully configurable vim instance as a full IDE on your developer machine, only.

          Driven by <3, passion and bravery.

          Anyhow; I switched back to vim after one year of neovim shrugs. Still a Junior, here.

      2. layer8 · · focus · HN ↗
        It’s somewhat important for privacy reasons that the feature is opt-in. I don’t know if that’s the reason historically, but I wouldn’t want a text editor to persistently store a copy of everything I type without my consent. It’s almost like a keylogger.

        Making privacy-sensitive features opt-in is a form of duty of care as well, to avert harm from the user.

        1. phoghed · · focus · HN ↗
          Edit history in JetBrains being on by default saved my bacon a few times over the years.
      3. b0ringdeveloper · · focus · HN ↗
        I prefer persistent undo being off. I like being able to hold down u and revert to exactly how the file was before I opened it. (Maybe there's a better way to do this?) With persistent undo on, it just keeps going and going. And if I need long term source control, that's what git is for. With persistent undo off, it's like opening the file creates a checkpoint that I can get back to easily.
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.