On caring for user data: NeoVim caused Vim undo files to be deleted (unsung.aresluna.org)

324 points by jandeboevrie 7 hours ago

jeremyjh 5 hours ago

This story has no references that support the author's version of events, but it does appear to be substantially true that:

1. The change would break undo history, for both Neovim and Vim [see edit: this is not the really the case]

2. This means Neovim would delete data created by a different program, on another user's computer.

3. This was known before the feature was released.

4. They did it anyway.

I don't think there can really be any post-hoc justification of this.

https://github.com/neovim/neovim/pull/13973#issuecomment-789...

edit: I missed an important detail. The user specified the same path for undodir in both nvim and vim. Vim requires a path to enable the feature - there is no shared default path. The user sharing a path changes the story considerably in my view, because now this is a case of nvim deleting data created by nvim as an alternative to writing a data migration for it.

I could still disagree with that, but it makes alternatives like "just use a different path" more complicated at a minimum and really changes my read of this situation completely. I think Neovim's decisions are justfiable in this context. Maybe they could have saved the contents of the old undo folder somewhere and notified the user - arguably that would be more empathic I don't really agree they had a moral duty to do this.

soraminazuki 2 hours ago

The feature that was broken is called persistent undo. The docs unambiguously state that edit history will be preserved unless Vim/Neovim detects that the "undo file is no longer synchronized with the file it was written for."

https://neovim.io/doc/user/undo/#_5.-undo-persistence

So even putting aside the Vim/Neovim interoperability angle, that contract was broken. Undo files created by old versions of Neovim will be deleted by more recent versions.

The interoperability issue can't be ignored either. Neovim was touted as a drop-in Vim replacement, and that needs to be taken into account when considering how changes affect users.

So many Neovim users have started by reusing their existing vimrc. I'm sure many still have ~/.config/nvim/init.vim symlinked to ~/.vimrc to this very day. With Vim, persistent undo is opt-in. Vim users who cared enough to opt in are highly likely to have explicitly set the path for undo files too. That's because Vim defaults it to the same directory as the file being edited, which clutters the filesystem. As a result, there are many users who shares undo files between Vim and Neovim simply because they reused their vimrc, not because they made the conscious choice to do so.

dtech 5 hours ago

The data is stored in ~/.cache which has the contract that it user-wide cached data, which also means it can be deleted without severely impacting programs.

It seems the author has too high expectations of this feature, or vim is using an incorrect path to store this is they want to make it available more reliably

soraminazuki 3 hours ago

That's some weird technicality that has nothing to do with the issue while also being completely false.

https://github.com/neovim/neovim/blob/fc3f0041fbe01c96f38224...

The feature that was broken is called persistent undo. The feature was inherited from Vim. In case it's not obvious from the name, nowhere does it state in the docs for persistent undo that data may be deleted at any time.

https://neovim.io/doc/user/undo/#persistent-undo

That Neovim changed the default storage path for undo files is completely irrelevant to whether the contract for persistence should be broken.

MatthiasPortzel 3 hours ago

NeoVim docs say it defaults to "$XDG_STATE_HOME/nvim/undo//". Do you have a source for ~/.cache?

=> https://neovim.io/doc/user/options/#'undodir'

buu700 4 hours ago

This reads to me like a case of blame on both sides. Putting data you don't want to lose in ~/.cache is PEBKAC, but if that fact is incidental and NeoVim would have removed the undo history regardless of its filesystem path, then the point remains valid that NeoVim is deleting user data that isn't its place to delete.

A lot of the comments here are getting caught up in legal arguments which may or may not be valid. Those are irrelevant. No one is taking the NeoVim developers to court; the post is merely warning that they knowingly accepted behavior which can cause harm. The question is whether or not that choice was responsible, not whether it's legally actionable.

undefined 4 hours ago

[deleted]

undefined 4 hours ago

[deleted]

wonnage 4 hours ago

So if a program decided it owned .cache and deleted it every startup you’d be fine with it?

yjftsjthsd-h 2 hours ago

dtech 4 hours ago

Insanity 5 hours ago

I switched from Vim to NeoVim this year, after about 15 years on Vim.

Not withstanding this incident, I would say that on the whole it has been a good experience with Neovim. (I didn’t actually ever use the persistent undo functionality in vim. Guess because of VCS it’s less needed for my use-case).

schmichael 5 hours ago

Same timeline for me, but this was my 3rd or 4th attempt at switching. Not sure if something materially improved or maybe LLMs finally just got good enough at helping me convert.

Insanity 2 hours ago

johnnypangs 4 hours ago

But you still have to share the undodir for both vim and neovim right? If your undo data was that precious why would you gamble the interoperability? You could just have them in different folders and it would be fine.

So the case is, you really need you undo history and want to try out neovim so you just copy paste you vimrc to the new place and accidentally delete your data? I don’t think it’s that bad personally. It’s bound to happen but it’s not automatic.

johnnypangs 4 hours ago

I have a far less sensationalist headline for this which is:

Two programs that save their cache in the same folder causes issues.

undefined 4 hours ago

undefined 4 hours ago

[deleted]

loeg 5 hours ago

It was ostensibly necessary for other, arguably more important features. Persistent undo maybe just isn't that important? I certainly don't use it nearly as much as the author seems to.

jeremyjh 4 hours ago

Why not give it a different name, so that it would not break vim?

loeg 4 hours ago

ludicrousdispla 5 hours ago

maybe they tried to undo the change, but were not able to

gavinhoward 6 hours ago

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...

cdmckay 5 hours ago

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.

59percentmore 2 hours ago

It's some sort of industry standard, though, isn't it? Google Chrome on Android auto-deletes the history database silently if it deems it corrupted (e.g., due to a bad write on a system with low storage). You just open your browser one day and it's all gone.

If not, I wonder how Google justifies it.

jwr 2 hours ago

loeg 5 hours ago

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?

xoa 5 hours ago

physicalecon 5 hours ago

antonkochubey 5 hours ago

Sorry for my ignorance, but what is the usefulness of undo persistence after a IDE restart? Don't you normally save your changes and finish a piece of work before exiting an DE?

Edit: some great examples in the replies here, thanks! Perhaps I should start using it in editors that support it, never gave it a thought before.

schmichael 5 hours ago

The reason why this feature is particularly useful in vi-likes is because they are not IDEs. I hop in and out of vi all day long. Depending on the task I might create a new tab, run a command in vi, or exit vi to run it. Vi’s appeal is that it is “just” an editor and your terminal and workstation form your un-integrated development environment.

jeremyjh 5 hours ago

The whole point of undo is that you realize you made a mistake later. If you've done that after you've saved your changes and exited the program, you'd have no expectation of undo still working unless you've enabled this feature.

It doesn't matter whether or not you can think of a reason you would want to enable it, but it should be pretty trivial to do so. Once you've enabled it, it should work.

drfloyd51 5 hours ago

The article gave 2 examples.

I can give some as well. IDE crashes. Computer reboots at an undesired time. Even if my work is saved, I am not “finished”. I would like my undo history to extend before file / open time.

traverseda 5 hours ago

I often use it to edit system config files, often on embedded devices where I don't have my git credentials setup, or on servers. In these cases we're already not in an ideal world, I don't have good reliable version control or change management in place. In those less-than-ideal worlds, having proper undo history is nice.

Joker_vD 26 minutes ago

prerok 5 hours ago

Most apps don't have it, so you might not be used to it, but have you never wished that you could undo the changes you made after you restarted the program?

Moreover, the vim history tracking is amazingly advanced. It's almost like a mini version control system. I highly recommend getting to know it.

dezgeg 5 hours ago

If your session / computer crashes, for one.

sdcfgy 6 hours ago

I've used vim since the first time it appeared in Debian repos. I have been told a thousand times that NeoVim is better, more modern and solves many (conveniently never cited) issues. I just ignored it and carried on. Feeling terribly vindicated at this point as it's a feature I use regularly and have no idea that it would be an issue in NeoVim.

kps 6 hours ago

I've used vi and nvi and (now) vim, and tried neovim, but :! is broken and “Conform to POSIX vi” is one of their “Non-goals”.

sodapopcan 4 hours ago

Nvim's `:!` behaviour was a deliberate design decision, which is one of the reasons I just stick with Vim9.

Agentlien 4 hours ago

mahboi 5 hours ago

I've never used NeoVim because Vim has been good enough.

tombert 2 hours ago

Vim is good enough now. The reason I switched to NeoVim in like 2015 is because it had async plugin support. With vanilla Vim at the time, if you had a lot of plugins it could get pretty slow and stuttery pretty quickly.

Vanilla Vim added it in 2016 I think, but by that time I had already fully switched to NeoVim and it didn't seem worth it to me to switch.

debo_ 6 hours ago

*vimdicated

WesolyKubeczek 6 hours ago

I used neovim because it felt way faster by default. I think treesitter runs circles around what classic vim is using to highlight syntax. That said, I never used both beyond basics, thus no horror stories either.

sdcfgy 6 hours ago

I haven't noticed any performance issues in vim to start with. It was fast on a 75MHz pentium for me. The syntax highlighting, same. No issues. I don't always use that though because I can't be bothered to set up anything much past the basic config.

everforward 6 hours ago

flohofwoe 5 hours ago

sodapopcan 4 hours ago

Tree-sitter is more performant for sure, and its potential for easier text objects is nice. However, Vim's syntax engine is more than good enough for non-complex highlighting (and many people don't want complex highlighting) and, while I don't have enough tree-sitter knowledge to explain this myself, I've seen examples of Lua versions of Vim plugins where tree-sitter is unable to handle some of the regex-based text objects present in the vimscript version.

As far as really cool uses for tree-sitter go, ast-grep is a fantastic tool. Of course it's a standalone program, so it doesn't need nvim to make use of it.

na1026 5 hours ago

[dead]

alphabeta3r56 6 hours ago

If one really needs an undo in today's day and age, use git.

leobuskin 6 hours ago

It’s two different dimensions in this case. VCS doesn’t preserve your local history (in JetBrains’ terms) of changes (and it wasn’t meant to by design)

sdcfgy 5 hours ago

I don't use git. I actually have something still using RCS.

undefined 5 hours ago

[deleted]

0xbadcafebee 5 hours ago

Someone didn't read the part about wanting a humane interface

gchamonlive 5 hours ago

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.

sdorf 5 hours ago

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.

gchamonlive 5 hours ago

Persistent undo is useful, but when it's unavailable or corrupted for me it's like "oh too bad", because it's just a convenience. And then I read things like this I get horrified by the workflows people adapt in order to avoid learning how to use the available tools properly. Seriously, it's just vim, borg and git...

delecti 5 hours ago

> I'm surprised to hear that people rely on it being persistent.

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

drfloyd51 5 hours ago

Not using it as a backup strategy. But it doesn’t matter. Vim has a feature, persistent undo. People are using it for whatever reason. Under your blessing or not. A different app, neovim, broke vim’s feature.

They don't get a pass because you disagree with an imagined use case.

gchamonlive 5 hours ago

Yeah, they could have done better, but to say they "had no concept of a duty of care to their users"... Isn't it a bit much?

tolerance 4 hours ago

whatevaa 5 hours ago

https://xkcd.com/1172/

Seems so. As smart as keeping tabs open in browser instead of using bookmarks, but "workflow".

gchamonlive 5 hours ago

Btw zen browser's folders are many streets ahead of Firefox's traditional bookmarking.

BarbaryCoast 5 hours ago

According to the rev history for VIM, persistent undo arrived in version 7.3, released in 2010. So Chisnall may have used it since 2000, but he didn't have persistent undo for at least two of the books he wrote. And it means it wasn't "maintained for almost 20 years", it's at best 16.

But it is a nice feature.

I do that by using version control. I have it hooked to my editor so that "save" is "check in". Now I have persistent, versioned, copies of all my states independent of whatever tools I happen to be using.

loeg 5 hours ago

Keep in mind NeoVim forked in 2014, too.

drfloyd51 5 hours ago

Type A. Type B. Save. Type C. Save. How do you get back to state “A” using git?

You do not have all your states available.

yonatan8070 5 hours ago

Maybe through autosave? If your editor makes a commit every time you're inactive for longer than X seconds that should solve that, which I'm pretty sure is how most editor undo stacks work at some level.

I just tried it in Nextcloud Notes on Android (FlorisBoard has undo/redo buttons), and it seems to work this way. If I type a bunch of words quickly and hit undo, it removes all of them. If I stop for a couple seconds between each word, it undos them one-by-one.

queenkjuul 2 hours ago

Is 16+ not almost 20?

dlisboa 6 hours ago

> 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.

pdonis 6 hours ago

Deleting important data without warning is not the same as not providing a feature users might want.

luma 6 hours ago

There is a flip side to this - is vim encrypting this data it keeps forever? If I delete something I consider sensitive, I might unwittingly be recording that presumed-deleted piece of data to my user profile somewhere to be deleted never.

webstrand 6 hours ago

MaxBarraclough 6 hours ago

jeremyjh 6 hours ago

nikanj 5 hours ago

sebzim4500 6 hours ago

crote 5 hours ago

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]: https://xkcd.com/1172/

soraminazuki 2 hours ago

pdonis 4 hours ago

applfanboysbgon 2 hours ago

jeremyjh 6 hours ago

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.

dlisboa 6 hours ago

Insane? Abhorrent?

Relax for a second. Get some perspective.

jeremyjh 5 hours ago

oh_my_goodness 5 hours ago

Sci-fi premise. Somewhere [1] there is a message board where developers openly celebrate those feelings of dislike and disdain toward users.

On that board, silently deleting a user's files is obviously justified. What would be out of line is complaining about software silently deleting user files.

[1] Long ago. Galaxy far away.

kebman 5 hours ago

From Cambridge Dictionary:

```markdown

abhorrent

/əbˈhɒr(ə)nt/

Abhorrent is an adjective that means morally very bad, hateful, or causing strong disgust and loathing.

```

I realise that this causes strong disgust and loathing in you, but can you please expand upon how it's morally very bad to prioritise speed and ease of use over undelete capability in Neovim? Are you unable to make backups or use Git?

overfeed 5 hours ago

undefined 5 hours ago

[deleted]

lokar 5 hours ago

All they had to do was pick a different file name

dlisboa 5 hours ago

True. But it’s not like they planned some vengeance against the VIM backup file.

People are making it sound like this is a huge company with a product and not a grouping of curious people with a couple hours of free time on a Sunday.

Most likely they never thought about it, then it broke, then it was not impactful enough to fix on their free time compared to other stuff.

jeremyjh 5 hours ago

roryirvine 5 hours ago

natbennett 7 hours ago

I was also a very early user of Neovim.

The way I personally remember it being positioned was “Vim, but with breaking changes.”

tmp_throwaway_q 6 hours ago

Yeah, this hasn't been a problem since forever (or at least I haven't noticed). They had to break the undo file format a while ago to actually work correctly for byte-level buffer change events (very important for tree sitter and other plugins listening for buffer changes). The undo file format is versioned, too, so it's not just YOLO'd; Neovim has since forever returned an error saying there's a version incompatibility. The outrage here doesn't make a lot of sense to me.

The original author of this post (on Mastodon) appears to have a bone to pick with Neovim since it's "platforming white supremacists"? I couldn't figure out what this meant. Some sort of internet drama I guess.

mikestew 6 hours ago

tmp_throwaway_q 6 hours ago

wongarsu 6 hours ago

bibimsz 6 hours ago

oefrha 5 hours ago

RVuRnvbM2e 5 hours ago

Undo files and persistent undo are not meant to work that way. They are just persistent across process restarts. That's all.

They live in ~/.cache which is defined as "user-specific non-essential (cached) data".

Despite this user's impressive résumé, they simply misunderstood the feature.

jorams 7 minutes ago

Unless something changed very recently neither vim nor neovim defaults to storing persistent undo files in ~/.cache. It's application state, not cached data.

The undodir option in vim defaults to the directory of the file, and in neovim it defaults to ~/.local/state/nvim/undo/.

freehorse 5 hours ago

What did OP misunderstand? I am not sure how and where their understanding of "persistent undo" is different from "persistent across process restarts"?

kazinator 5 hours ago

In what way is it not a process restart if I stop the process, install/upgrade NeoVim and start a new process?

RVuRnvbM2e 4 hours ago

It's the part where you upgraded and apparently failed to read the release notes.

Or in the OPs case, installed a totally different application and was surprised by an incompatibility.

kazinator 2 hours ago

tremon 4 hours ago

The lifetime of files in ~/.cache/ is the same as what the FHS documents for /var/cache [0]:

> Application cache data. Such data are locally generated as a result of time-consuming I/O or calculation. The application must be able to regenerate or restore the data. The cached files can be deleted without loss of data.

Meaning: the persistence of such files is not guaranteed across application restarts. If vim (and also neovim) had intended for the undo files to outlive the program, the files should have been put in ~/.local/state instead -- as also explicitly documented by the XDG [1]:

> [XDG_STATE_HOME] may contain: [..] current state of the application that can be reused on a restart (view, layout, open files, undo history, …)

[0] https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard#...

[1] https://specifications.freedesktop.org/basedir/latest/#varia...

kazinator 3 hours ago

maxnoe 2 hours ago

skybrian 6 hours ago

Software developers do sometimes make promises to their users, but I think these promises ought to be explicit rather than assumed. You can't simply assume a "duty of care" and expect that other people will understand them the same way you do.

(Or rather, you can, but you will likely be disappointed.)

recursivedoubts 7 hours ago

They are open source developers, giving away free software as a gift. There is no duty here.

We can speak, respectfully, of how important backwards compatibility is to us, and ask nicely for them to give more of their time to support it when their free sodftware isn't backwards compatible. Perhaps we can even offer to help implement it.

But they have no duty to do so or to "care" for their users. (They have already demonstrated they care for their users, btw, by giving them free software.)

EDIT: I missed an important part of the story, which is that they mutated existing files in a non-backwards compatible manner. That should have been avoided, I understand where the (secondary) author is coming from now.

rlue 6 hours ago

The argument is that developers have a duty not to arbitrarily delete data on your system that you may have relied on that was produced by another program just because they’d like to replace it with something in their own format.

I don’t care if you’re volunteering your time; if you build something whose implied purpose and success depends on other people using it, you emphatically have a duty to those people not to silently destroy stuff that was there before your software was.

pdonis 6 hours ago

It's worth pointing out that vim is not "another program" as far as Neovim is concerned. It's an earlier version of the same program. Neovim is a fork of vim, not a totally different editor that happens to share part of a name.

goodmythical 6 hours ago

undefined 6 hours ago

jeremyjh 6 hours ago

pdonis 6 hours ago

> giving away free software as a gift

Even a gift comes with an implicit promise that it will do no harm. Deleting important data of yours without warning is harm.

xigoi an hour ago

If you’re storing your important data in ~/.cache, you’re eventually going to suffer even if you don’t install Neovim.

timschmidt 6 hours ago

This gift comes with the following clauses listed plainly in the license file:

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

InsideOutSanta 6 hours ago

jstanley 6 hours ago

bunderbunder 6 hours ago

jeremyjh 6 hours ago

zbentley 6 hours ago

“Here, take this car, it’s free!”

“Ow, the gas pedal is actually a bear trap.”

“Why are you complaining? It’s free!”

k6hkUZtLUM 6 hours ago

This is a very apt analogy. If you give someone a car (or sell it cheap) and you know there is a problem with the car, then it is your duty to tell them. "Hey, I've been having trouble with the breaks they need to be pumped. Be careful about that."

dima55 6 hours ago

Then you don't take the car. Why is this confusing?

leoc 6 hours ago

jstanley 6 hours ago

InsideOutSanta 6 hours ago

Espressosaurus 6 hours ago

mcphage 6 hours ago

undefined 6 hours ago

WesolyKubeczek 6 hours ago

layer8 6 hours ago

A duty, like a responsibility, can be something you feel or choose for yourself. The fact that the maintainers of some software don’t feel it is a perfectly good argument for not using that software. There is no necessary connection to compensation or transactional thinking.

bsoqk 6 hours ago

If I give away food I have a duty not to poison you. It doesn’t matter you didn’t pay for it.

thih9 6 hours ago

Others are eating it and are fine, chances are you’re allergic. Fortunately all ingredients are listed, you can check - or even modify the recipe yourself.

Chris2048 5 hours ago

ToucanLoucan 6 hours ago

It's not poison, it's a broken feature. And you have the source code. Fix it if you like.

pdonis 6 hours ago

Grombobulous 6 hours ago

Software isn’t food.

pdonis 6 hours ago

undefined 6 hours ago

bsoqk 6 hours ago

bigstrat2003 6 hours ago

rwmj 6 hours ago

This is absolutely true. On the other hand, if there's Vim, Neovim, emacs, MS Word, Google Docs etc and some treat me with respect and others do not, that might affect my choice of which software to use.

Snarwin 6 hours ago

Sure. And likewise, users who care about backwards compatibility have no duty to do anything for the Neovim developers--they can simply use a different editor that suits their preferences.

JacobKfromIRC 6 hours ago

Is there a good way to avoid programs like this in general?

boredumb 6 hours ago

jeremyjh 6 hours ago

They wrote this software with the explicit intention of offering it to other people to use. Their program deleted data created with a different program, on someone else’s computer. If they have no sense of duty that would preclude doing that, no one should use their software.

gozzoo 6 hours ago

> They are open source developers, giving away free software as a gift. There is no duty here.

But actually there is! They didn't start from scratch. They took another very successfull and beloved project with the promise "to make it better". There is some promise here and the duty not to make it worse.

margalabargala 6 hours ago

"Better" is subjective. They made it better...for themselves. Then gave it away so people who share their opinion, had the opportunity to choose to use it.

macintux 5 hours ago

brookst 6 hours ago

And this obligation lasts… for the rest of their lives?

owebmaster 6 hours ago

It would be really surprising if they could make it better for literally every user. The perpetual undo is just better handled by git.

TheOtherHobbes 6 hours ago

"Behold my glorious generosity, which eclipses your petty meaningless little data!"

This is the extreme version of "I enjoy coding but I hate users."

It may be legally valid in absolute technical terms, but I'm going to take a lot of persuading that it's a healthy attitude.

bestouff 6 hours ago

Sure. And nobody has a duty to use it. This user states that (s)he doesn't want to use an editor that doesn't care for its users. I don't blame anyone here.

novia 6 hours ago

If people can be upset when llms delete a file, we can be upset when an open-source project deletes a file.

ryandrake 6 hours ago

HN commenters constantly mistake “what I should do” with “what I am obligated to do.” Nobody is saying open source developers are legally mandated to be careful with user data. We are saying they should. There’s no need to haul out the license and put our lawyer hats on here. One can be within one’s legal rights and still be wrong.

xboxnolifes 6 hours ago

Ill remember this when I distribute malware.

sdcfgy 6 hours ago

To be fair some malware has a better support and care experience than some open source software. The malware actively encourages you to contact them to pay the ransom. The open source software, no such luck.

xbar 6 hours ago

Oh my. This set of principles is appropriate for malware.

manvillej 6 hours ago

If you don’t like how it works, go build your own.

jeltz 6 hours ago

undefined 6 hours ago

[deleted]

diego_moita 6 hours ago

> giving away free software as a gift. There is no duty here.

By that logic, if Facebook gives away their services for free then they don't have the duty to protect their user's privacy and mental health?

mindslight 6 hours ago

By your reasoning, a doctor who volunteers to provide free care to people has no duty of care to those patients. This is patently absurd - ethics and norms are a large part of what constitutes a professional.

And for what it's worth, I have flagged your comment for the inevitable pointless bickering it has precipitated. While applying reductionist frameworks and seeing where they lead is a necessary part of an individual's path to understanding, please avoid pushing ignorant assertions ("there is no duty here") as if they might constitute well reasoned truths.

sdcfgy 6 hours ago

There is not a duty but there is an image and quality issue. Something many open source projects suffer from and should not.

And even mentioning that results in "fork it if you're not happy" which immediately turns everyone off who's had to maintain a fork to fix a minor issue in something before. And anyone who can't fork it is being told to go to hell.

Everyone needs to quite frankly get off their high horse, crank the ego down and listen to users. Because you're damaging open source with the attitude.

30 years ago, things were better. They got a lot worse, particularly since github appeared.

yipinwong 6 hours ago

You spewing bs like the left-pad dev who removed it from NPM a decade ago crashing everything.

Yes, OSS can start with just a passion without a duty, but as the scale grows you have a duty to make sure it does not have adverse effect.

If you don't like the duty, just make it die by building it crappy like VIM does.

seemaze 4 hours ago

This incident not withstanding, persistent undo breaks my mental model of file state. I treat writes as commits, which allows an open and modify session to be an exploratory branch until I decide to save it.

It is counterintuitive in the same manner as when excel persists undo history chronologically across the running application process, and not separately per document.

Similarly AutoCAD intersperses application parameters and tool configurations alongside actual data operations in it's undo history.

joelthelion 3 hours ago

As a vim user, I feel neovim was useful for one thing: it shaked regular vim development a bit. That said, I see no reason to switch. Good old vim is rock solid and featureful. I hope it doesn't die due to neovim's competition.

tpoacher 5 hours ago

For similar functionality in nano, if anyone's interested, every time you save (regardless of exiting), nano keeps a backup.

Not on by default, you have to enable it in your .nanorc (not least because you need to provide a backup folder where you want to store these backups).

Very handy. Occasionally I've deleted files accidentally or made destructive changes, and could restore a working version from the past as if I had a timemachine.

modeless 5 hours ago

Today it's the work of a moment to get a coding agent to change the format of a file for you. I guess the point of this story is supposed to be like the famous Van Halen brown M&Ms contract clause. But the world is changing fast and I think it makes sense to start taking more ownership of your own computing experience, especially when the software you use is open source. If you don't like it, have an agent change it! You don't need to convince a maintainer of anything.

asveikau 5 hours ago

More like in the LLM era, people are disrespecting the user and not sweating these details with ever increasing velocity. It isn't good.

This story is about software being a slow, deliberate process where a lack of gatekeeping can lead to data loss. This is the type of problem which is getting worse.

linsomniac 7 hours ago

>I deleted something from this file, maybe last week

Don't forget time travel: `:earlier 7d`

spamizbad 6 hours ago

"Vibe shift" is all the rage these days but one area where it's most apparent is modern software.

People of Raskin's vintage had a very humanist approach to computing. The mentality was very much an outgrowth of the cultural revolution of the 60s. Computer usage should be joyful rather than toiling. The computer should help you. It should make you feel good about what you create.

That stands in stark contrast today, where things are more hostile. Not just in terms of "Dark patterns", or writing off user needs for the sake of expediency... but even the way we talk about technology today. You need to use X, do Y or you're "not going to make it" / "escape the permanent underclass". It's bleak.

I recently restored a vintage Macintosh SE I picked up at VCF Midwest and despite its limitations that machine was an absolute JOY to use despite its limitations and nearly 40 years of age. This was a machine and software designed by Raskin's contemporaries and it shows.

creata 6 hours ago

> but even the way we talk about technology today. You need to use X, do Y or you're "not going to make it" / "escape the permanent underclass". It's bleak.

That's just how people market things these days, preying on desperation and fear of missing out. It's not how normal humans talk, I hope.

ryandrake 6 hours ago

Software’s purpose is clearly shifting from “what’s good for the user” to “what’s good for the developer.” Instead of enabling me, software now seeks to lock me in. Instead of making my life easier, software decisions are made based on what makes developers’ jobs easier. Instead of being careful with my data, software now comes with giant legal terms that allow developers to be utterly careless with it. Software is now designed primarily to funnel money to the developer, not to bring joy to the user.

And look at this article’s HN discussion. Many people indignantly defending it. “It’s open source. If you don’t like it deleting your data, don’t use it!”

drfloyd51 4 hours ago

Computer nerds are a rare breed. We like to be right. And we like to be arrogant. And if we have a solution to a harmful problem… it’s your fault for not being “smart enough” and you suffer your consequences.

Maybe we aren’t so rare. I can think of another group that values enduring hardship over progress making things easier for everyone.

tolerance 5 hours ago

The discussion here is going to be hamstrung without direct access to the entire Mastodon post:

https://infosec.exchange/@david_chisnall/117171776562702259

jurf 6 hours ago

To be the devil’s advocate here, I think Vim needs less backwards compatibility, not more. In the sanctifying of “muscle memory” it completely stopped innovation, to the point of slowly drifting to obscurity.

Of the over a hundred students I taught when I helped out in uni, basically no one wanted to learn it, despite my enthusiasm.

And I sympathise. As I get older, I slowly grow more and more distaste for software that does not respect my time enough to give me properly-crafted defaults. Vim, in the age of modern editors, cannot compete. Not without 20 plugins with conflicting shortcuts and its self-imposed cliff of a learning curve.

And I’m saying this from a place of love; I’ve been using Vim (at least as a VSCode extension) every day for the last 10 years. But it never really grew up to the promise that the “Vim Creep” essay [1] gave me.

[1]: https://web.archive.org/web/20190227031109/https://www.norfo...

:wq

mahboi 5 hours ago

Vim is always going to be obscure because it's not obvious from looking at it how you use it. Muscle memory is the entire point. You don't need to change any keybinds, and I don't. I did feel discouraged to learn it at first because the people introducing it to me were doing pointlessly fancy things in it, some combination of custom keybinds and scripts to mass edit files.

As for default plugins, it'd be neat if they curated a set of optional ones, but nothing should be preinstalled.

jurf 5 hours ago

I dream of a Vim that would embrace colours and Unicode and can better communicate modes and context.

I dream of a Vim that wóuld guide and teach me how to use it, so that it does not scare away people because they can’t close it.

I dream of a Vim that embraces the needs of editing contemporary programming languages and fills in its UX gaps correspondingly (changes single to double quotes, anyone? Function argument order?).

I dream of a Vim with native Git gutters.

I dream of a Vim with sane default leader commands.

I dream of a Vim where I see line numbers by default.

I dream of a Vim where “Y” is consistent with other commands.

I dream of a Vim that detects correct indentation by default. And that can visualise whitespace.

I dream of a Vim where Ctrl+V does not have an assigned action that looks like it blocks input.

I dream of a Vim that experiments with keyboard ergonomics, not just mnemonics.

I dream of a Vim where quintuple-tapping Escape is not a habit I subconsciously form why learning it.

I dream of a Vim I stumble on people discovering and exploring, and not have to persuade people for months just to try it.

bombela 36 minutes ago

0xbadcafebee 5 hours ago

The simpler and less contentious way to adopt innovations is to make a new tool with the innovation. For example, you might like https://helix-editor.com/

jurf 5 hours ago

Oh my, I will, thank you.

utopcell 5 hours ago

While I agree with the article's point, we should note that collisions do not happen out of the box because Neovim defaults undodir to $XDG_STATE_HOME/nvim/undo/ (~/.local/state/nvim/undo/), while Vim defaults to storing .un~ files alongside the edited file or inside ~/.vim/undo/. Data loss only occurs if both editors are configured to share an undo directory or save inline .un~ files.

utopcell 4 hours ago

We also live in a very different world now compared to 2021 when the problem was reported. A brief Gemini query to translate the old diff format to the new one returned in a few seconds with what appears to me a correct, < 40-line, solution.

carterschonwald 5 hours ago

duty of care is kinda absent in too much of software engineering. its painfully missing in recent anthropic models because of the broken value framework they use for ethics. but broadly: i currently have the stance that text gen language models should prioritize users wellbeing rather than model orovider liability

neuodev 6 hours ago

Awkwardly speaking, Microsoft Word is a great example of a program that appreciates backward compatibility.

fooblaster 6 hours ago

How does one use persistent undo in vim?

fooblaster 6 hours ago

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

layer8 6 hours ago

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.

phoghed 6 hours ago

b0ringdeveloper 4 hours ago

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.

oblio 6 hours ago

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.

ProofHouse 5 hours ago

VIM should be in the title here as well

bethekidyouwant 6 hours ago

That’s why I stopped getting all those swap file messages every time I opened vim…

mindslight 6 hours ago

Continuing the analogy - rather than a relationship that might even possibly include a duty of care, the relationship of the modern surveillance industry (Faceboot, Google, etc) to its "users" is that of arms manufacturers to military targets.

undefined 6 hours ago

[deleted]

applfanboysbgon 2 hours ago

Disturbing to see justifications for this program behaviour. The only time a program I write explicitly deletes persistent user data is if the user is interacting with a modal that very, very clearly warns them they are taking an intentional action to delete data. Migrations always backup the files being operated on before performing any migration actions. This is surely common sense. It is clear that many of you have absolutely zero regard for anyone who uses your software. Which is, I suppose, not surprising given how much software is absolute unusable dogshit.

fatbird 6 hours ago

Unsaid in the blog post is that disabling persistant undo is one of the most common config changes for vim users who bother to set things up the way they like. Persistent undo is what causes your filesystem to be littered with tilde files, which have the same name but prefixed with a tilde. Every file you touch with vim gets a tilde version. Your ls output becomes polluted with noise.

philipallstar 6 hours ago

> Apparently now they’re platforming white supremacists. I am completely unsurprised. Different facets of the same underlying attitude.

This was the end of the original Mastodon. Which is why I just can't with Mastodon or Bluesky. Casually tossing around ridiculous claims to back up an opinion on persistent undo.

sebzim4500 6 hours ago

Are you responding to the wrong post? This isn't anywhere in TFA

creata 6 hours ago

It's in the first link in the post.

slopinthebag 5 hours ago

yea i found that a bit odd to throw in right at the end there. i dont really understand what that means

undefined 6 hours ago

[deleted]

neoyagami 6 hours ago

[dead]

Anduia 7 hours ago

TLDR: Neovim did a breaking change to persistent undo

jeremyjh 6 hours ago

That is not the story here. The story is Neovim deleted data created by another program, on someone else's computer.

I don't know if this story is true, but you can't defend it when taken at face value.

johnnypangs 5 hours ago

Do you have a link to how this happened? From what I understand you’d have to point the undodir at the same place as vim for this to happen? It’s not this way by default and you have to put a copy of the exact same thing in your neovim vimrc right without understanding that it would do this?

tzs 5 hours ago

That wasn't the point.

The point was they did it in a completely stupid way and responded to a bug report about it in a way that suggested this might not be just the occasional stupid that we've all had slip into our code.

SigmundA 6 hours ago

I think this might not be clear on the issue, it broke vim's undo file, as in it deleted it and replaced it with Neovims version.

Just by trying Neovim you can lose your vim undo file.

sscaryterry 6 hours ago

This is the crux of the matter. I wish a few of the "its OSS" commentators here would read this.

mcphage 6 hours ago

…and even trying Neovim out on a file permanently deletes your undo history for that file, even if you switch back to vim.

bt_hn_19418 7 hours ago

[dead]

hasperdi 7 hours ago

[flagged]

kccqzy 6 hours ago

Right. The point of the article is for the author to tell us neovim doesn’t care about their users and the author recommends us to use something else.

Grombobulous 6 hours ago

Put another way, why did the author “test in production” on their important work when evaluating a new piece of software they were unfamiliar with?

Vim is a very popular piece of software to the point where there are dozens or perhaps hundreds of forks made by all kinds of people. Many if not most of these forks are probably not very good.

planckscnst 6 hours ago

And you can also rant about it so other people are not harmed in the same way without warning

sdcfgy 6 hours ago

I hate this attitude. It is what makes the free software community look like utter dicks to the user community, particularly those who can't really fork or contribute to it. It's a serious image issue.

Hell I can and have contributed and have been told to fuck off and fork it or entirely ignored.

xenophonf 6 hours ago

It's hardly a rant. Not once did either author question the birthright of the Neovim developers in Russian.

I think more software engineers should worry about this stuff. If I had to teach a bunch of juniors in a computer science or software engineering degree program, I'd make them read this as a case study alongside good ol' Therac-25. The software we create is _useful_. How it affects other people _matters_. We ought to care about that no matter what the legal disclaimers say.

Ekaros 6 hours ago

[flagged]

hyperlinerapp 6 hours ago

It’s Open source.

Some people just want to keep looking at the gift horse in the mouth.

jeltz 6 hours ago

As an open source developer I hate this attitude. If you do not care about the users why are you even releasing the software?

Ekaros 5 hours ago

Well in these ages of vibecoding. Maybe you are doing it for yourself. Or because you can? Actually caring of users hasn't been very high for most software for long time...

phoghed 5 hours ago

Because they care about a different subset of the users? You can’t make everybody happy.

hyperlinerapp 5 hours ago

It’s a free country.

Chris2048 5 hours ago