Why does vim always say "Already with the oldest changes" when I try to undo?

I couldn't find this problem anywhere, so here's it for the next guy.

Somehow my vim, which is very set up with a lot of plugins much harder than I want to debug, intermittently breaks in a state where if I press "u" it says "Already with the oldest changes." When I pressed CTRL-R, he said: "Already with the newest changes." But he will not cancel or repeat anything.

Very frustrating.

+3


source to share


1 answer


This happens when undolevels is negative, which seems to be used to keep vim undo from using memory. For some reason my undolevels were set to -123456.

Set your undolevels to a large positive number like 999999 and everything will be back to normal.



You can also check your .vim trees, etc., if you are using plugins and states that do this, to keep the settings for each file so they don't have "setlocal" undolevel settings inside them. I had to clean up several dozen of these nefarious configurations.

+2


source







All Articles