Part 5Patterns

This part of the book is devoted to patterns, which are integral to some of Vim’s most powerful commands. We’ll look at some tricks that make it easier to compose regular expressions and to search for text verbatim. We’ll study the mechanics of the search command itself and then explore two powerful Ex commands: :substitute, which allows us to find occurrences of one pattern and replace them with something else, and :global, which lets us run any Ex command on each line that matches a particular pattern.

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.