You don’t need a global command for this. The substitute command in by itself will suffice by
- adding a wildcard
- and adding an end-of-line.
example
%s/.*text.*\n//gc
You don’t need a global command for this. The substitute command in by itself will suffice by
example
%s/.*text.*\n//gc