I am using an interactive substitution that spans multiple lines. In order to determine whether each particular occurrence should be replaced, I need to see all lines that are included in the search criteria, but vim only displays the first line.
I know you can scroll the window with zz
, zt
and zb
, but this doesn't appear to work in interactive substitute mode. Is there an alternative approach?
Here is an example command, which replaces three newlines with two:
:1,$s/\n\n\n/^M^M/gce
/\n\n\n
and then do:%s//\r\r/gce
?