A Substitute command combines the effects of a Search command and a Change command. That is, it searches for a string (regular expression) just as the / command does, allowing the same special characters discussed in the previous section. When it finds the string or matches the regular expression, the Substitute command changes the string or regular expression it matches. The syntax of the Substitute command is
As with all commands that begin with a colon, vim executes a Substitute command from the status line.
If you do not specify an address, Substitute searches only the current line. If you use a single line number as the address ...