What is a good way to automate substitute commands in vim?
Suppose I have something like:
s/foo/bar/g
except much more complex and I want to run it on selected ranges without having to type the substitute command?
How can I save the substitute command and give it short convenient name that I can invoke it by?