Summary
In this chapter, we covered the :substitute command and macros—two powerful tools we can use for refactoring.
We covered the :substitute command and its flags. We looked into arglist, which is a way to execute a command across multiple files.
The :substitute command also supports regular expressions, which make your life a lot easier by allowing you to go beyond literal matches. We covered the basics of regular expressions and Vim magic modes (which are ways of interpreting special characters when parsing regex-enabled strings).
Finally, we looked at macros: a feature that lets you record and later replay a set of keystrokes. Macros can be edited the same way that registers can, and can also be made recursive to play as many times ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access