Vim Tips: Searching a File for Multiple Strings
July 24, 2023 —
Gregg Szumowski
In Vim you can perform a search like this: /string1/;/string2
This will will combine two searches. It tells Vim:
- Search for string1, then
- From there search for string2 on any line that also contains string1.