Comment

Comment by ofseed

Spot on. It genuinely surprises me how many people don't realize that vim's persistent undo feature resets if the file is modified by anything outside of vim itself.

For example, a common scenario is rolling back a file via git, which triggers this reset. However, considering they treated it as a reliable version control system without actually reading the documentation, they probably aren't using git anyway.

The good news for them, however, is that they actually can bypass this limitation and treat their undo history like version control—by using nvim-fundo [1]. The catch is that they'll have to switch to nvim, as there isn't a direct equivalent for vim.

1. [nvim-fundo](https://github.com/kevinhwang91/nvim-fundo)

parent ofseed 1 month ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton