Vim’s :s
command lets you use substitution with regular expressions. While /
is the common delimiter, you can use other characters (except for \
, "
, |
).
Examples
Standard Substitution
Same substitution with #
as delimiter
Using a different delimiter lets you avoid escaping slashes in patterns like file paths.