Is there a way to hide all lines that did not match, while going through the list of result lines?
In a long file, I would like to search for a pattern that will match roughly 200 lines or so. The matched lines are in random places in the file.
When a line matches, only the line itself is relevant, no context above or below.
Normally, I would search with
/ and jump through the matches with
But that means there are only one or two relevant lines on the screen at a time.
A brute force approach would be to delete all non-matching lines, and undo that deletion later. But that's ugly in various ways, even if it would not end up in persistent undo.