How do I fold many lines and then do a search so that only the lines with search hits pop up while all the rest stay folded? This is how text editors of the 1970s worked. Much appreciated if you can spare the time to respond.
One way you could do it is with the command:
This runs the command
zv on every line that has a match for your search
zv opens as many folds as are necessary to make the current line unfolded.