in reply to Re: Global substitution and report
in thread Global substitution and report

But this would disable multi-line substitutions. So I need a way to replace in a text buffer that is loaded from a file.
I would like to use the same feature also for already loaded files in a editor window.
I also create a backup of the file before applying the changes so that they can be undone latter.

Replies are listed 'Best First'.
Re^3: Global substitution and report
by FunkyMonk (Bishop) on Aug 27, 2007 at 08:58 UTC
    In which case, I'd slurp the file in, do the substitutions and write it back out to a temp file. Then I'd run diff on the original & temp files.