Friday, November 25, 2011

undo lust substitution made with :%s/foo/bar/gc

Hello,

Is there a quick way to undo only the very last substitution made
while performing '%s/foo/bar/gc' *while in the substitution mode*. I
think I am asking whether there is something I can do at "replace with
le (y/n/a/q/l/^E/^Y)?' prompt to go back one substitution.

Use-case is something like: I go through the file, only making a
couple of changes (but skipping many-many matches). I then screw one
up. I either need to go back and make all those changes again, or -
ideally - press something to undo my decision on the last prompt.
Preferably it'd be the latter.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment