I think it's correct as written, but phrased a little strangely.
I'd rather it say, "Type :s/old/new/g to replace 'old' with 'new'."
The confusion seems IMO caused by the "highly informal" usage "substitute X with Y" which "should be avoided in standard English" according to my dictionary, the Concise Oxford, which recommends "substitute Y for X", the original wording.
Regards, John Little
It is, but it's a less commonly used phrasing, so it is confusing to some.
I see the meaning but the OP reversed the meaning.