Is it possible to select some text with visual line and undo all changes made to it from the beginning ?
How can I undo all changes to a block of text in vim?
I actually do that by undoing everything yanking the block then redoing everything to the last modification and then replacing the block with the yanked text.
+1 May be ok when block fits on the screen and there are not many things to undo/redo. Troublesome otherwise. –
Maria
why does it need to fit in the screen? but yes, the undolevel matters. –
Alecto
or you can save the file to a different name and then comparing the two versions with vimdiff - this solves the undolevel problem –
Alecto
@KARASZI It doesn't "need" to. But is easier for me to manipulate with. –
Maria
I would like to note that multi-level undo requires 'set nocompatible', which is not default. –
Maria
© 2022 - 2024 — McMap. All rights reserved.