David Chisnall (*Now with 50% more sarcasm!*) (@david_chisnall@infosec.exchange)
I have used vim since around 2000. I have written five books, a PhD thesis, a few dozen papers and over 150 articles with it. At this point, my higher brain functions are not engaged at all when I use a bunch of common vim commands, they just happen. Documents I wrote with anything else have random :w in the middle.
So I tried NeoVim when it was quite new. Vim that you are familiar with, but better? Great!
Persistent undo is one of my favourite features of vim (introduced a few years after I started using it). My .vimrc includes a couple of lines related to this. One sets the path to be under ~/.cache so the undo files do not clutter the rest of the filesystem (I do the same for the swap files). The other sets the undo limit to something large (10,000, I think) because disk space is *enormous* relative to pretty much anything involving human-readable quantities of plain text.
I don’t often need the persistent undo. But on the few occasions when I have needed it, it’s been invaluable: ooops, I deleted something from this file, maybe last week and one reboot ago, what was it? Undo until I find it, copy it, paste it into the current version. Or, a bit more commonly: I had this working, then I tidied it up ready to commit, now it isn’t working, what did I do?
Vim has kept this working across major version upgrades over a period of about 20 years. I don’t even think about it, it’s just part of Raskin’s First Law: A program may not harm a user’s data or, through inaction, allow a user’s data to come to harm. If vim or the computer crash, or if I close a file and come back to it six months later, my undo history is still there.
The first thing I noticed in NeoVim was that undo didn’t work. I tried opening the file in vim and undo didn’t work there *either*.
Neovim had changed the format of the undo files. It hadn’t upgraded the old one. It hadn’t used a different name for its undo files. It had just noticed the existence of a vim undo file, deleted it (losing all of the data in it) and replaced it with one that vim couldn’t read.
I raised an issue about this and was told that the persistent undo format was unstable and users should not rely on data being preserved in a feature explicitly called *persistent* undo. It had changed once and would probably change again.
And that ended my experience with NeoVim. The authors showed immediately that they absolutely could not be trusted with any of my data. Breaking persistent undo is something I could forgive as a bug, but 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.
Apparently now they’re platforming white supremacists. I am completely unsurprised. Different facets of the same underlying attitude.
EDIT: Apparently I misremembered. It did not unconditionally overwrite the file, it prompted to tell me that it was unreadable and overwrote it when I hit the confirmation (which vim has trained me for decades is always a safe thing to do). This isn't the key point though, the important bit is that *users expect data to be preserved and accessible* and good software aims to respect those guarantees. My issue with NeoVim is far less about the fact that it lost the ability to read the old format and then happily replaced it with one that Vim (or older versions of NeoVim) couldn't read, it's that the authors *thought that this was okay*.
The issue in the NeoVim repository also says that Vim has broken the format twice before. The format has a version header. It was bumped to 2 in Vim in May 2010. Vim 7.3 was released in August 2010 and was the first release to ship with persistent undo support. As a user, no release of Vim in the 16 years since the feature shipped has broken that backwards compatibility. A Vim 7.3 undo file loads fine with the latest vim. If you last edited a file ten years ago with vim and then open it with the latest vim and hit `u`, your most recent change will be undone. Whether that was intended or not, that's the user experience that's come with the feature. And that's what NeoVim broke, along with my trust in their ability to develop user-facing software.
Infosec Exchange