(no title)
Lio | 12 days ago
The practical usage is it's aways possible to get back to a previous state you were in, which is pretty neat.
e.g. You can undo 5 changes, try something else and decide that you prefered the text before you started undoing things. In most programs with a linear undo history you've wiped out your previous changes but not in Vim.
You can hop about the branches of the undo tree using the g+ and g- commands but it's much easier to add an undo tree visualiser plugin such as the venerable old Gundo[2].
bradrn|12 days ago
(Incidentally, the documentation is wonderful: ‘The only downside to this more advanced yet simpler undo system is that it was inspired by Vim. But, after all, most successful religions steal the best ideas from their competitors!’)
nothrabannosir|12 days ago
gmmachine|12 days ago
I just downloaded VSCode for the first time recently -- which I was delighted to find has a VIM mode. From what I read VSCode's VIM mode does not respect the undo tree of actual VIM.
ghosty141|12 days ago
sepeth|12 days ago
behnamoh|12 days ago
sodapopcan|12 days ago
embedding-shape|12 days ago
boltzmann64|12 days ago
Lio|12 days ago
Meanwhile the undo/redo tree is always there, ready to use and has no overhead. You can ignore it completely until you need it to save your arse.
sodapopcan|12 days ago
Waterluvian|12 days ago