I have on many occasions run into situations where it would be very handy if :normal worked the way :g does with respect to how it handles changes in number of lines during operation, and I have not run into any case (nor can I imagine one) where the current behaviour is favourable. It seems less intuitive and less useful for it to behave this way.
That's the workaround I'm using right now, but there are many cases where I want to operate on every line in the range, forcing me to use something like my previous example:
:<range>g/^/norm whatever
It feels hacky; I'm essentially trying to avoid what is arguably the primary function of :g (matching a subset of lines) just to get that line-marking behaviour for the :normal operation. It makes me wonder, is there any reason for :normal to lack that behaviour? It seems like an objective improvement.
Use
:keeppatterns g/^/...
to avoid setting @/.
*Of course* there is a command for that. :)
Thank you, Justin, and thank you, Christian. Between a patch and a workaround I don't think I could ask for a better response.
Cheers!