Chapter 15Global Commands

The :global command combines the power of Ex commands with Vim’s pattern matching abilities—it runs an Ex command on each line that matches a specified pattern. Alongside the Dot Formula and macros, the :global command is one of Vim’s power tools for performing repetitive work efficiently.

Get Practical Vim, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.