I want to view my complex substitution is correct before moving to the
next one in:
:%s,old,replacement, flags
It is problem because my regex are mutliline spanning paragraphs, and easy to
make a mistake in the replacement . So I have top stop and restart again to view
each subst is correct.
Emacs interactive search replace, has "," to view replacement before moving on:
https://www.gnu.org/software/emacs/manual/html_node/emacs/Query-Replace.html
Is this feature possible in vim?
--
Mosh
vim 8.2 :subst flags we have are:
[c] Confirm each substitution. Vim highlights the matching string (with
|hl-IncSearch|). You can type: *:s_c*
'y' to substitute this match
'l' to substitute this match and then quit ("last")
'n' to skip this match
<Esc> to quit substituting
'a' to substitute this and all remaining matches
'q' to quit substituting
CTRL-E to scroll the screen up
CTRL-Y to scroll the screen down