| ▲ | gavinhoward 2 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 an hour ago | parent | next [-] |
| 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. |
| |
| ▲ | loeg 36 minutes ago | parent [-] | | 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 28 minutes ago | parent | next [-] | | 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? | |
| ▲ | physicalecon 21 minutes ago | parent | prev [-] | | [dead] |
|
|
|
| ▲ | antonkochubey an hour ago | parent | prev [-] |
| 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. |
| |
| ▲ | jeremyjh an hour ago | parent | next [-] | | 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 an hour ago | parent | prev | next [-] | | 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. | |
| ▲ | schmichael an hour ago | parent | prev | next [-] | | 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. | |
| ▲ | traverseda an hour ago | parent | prev | next [-] | | 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. | |
| ▲ | prerok an hour ago | parent | prev | next [-] | | 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 an hour ago | parent | prev [-] | | If your session / computer crashes, for one. |
|