Search|Fold Lines

(available in EditPad Pro only)

After using Prepare to Search or pressing Ctrl+F and entering a search term, click the Fold button on the search toolbar or select the Fold Lines item in the Search menu to fold all lines in which the search term cannot be found underneath lines in which it can be found. The result is that only lines in which the search term can be found will remain visible. The exception is the very first line in the file, which will remain visible even if it doesn't have any search matches. All lines until the first line with a search match will be folded underneath the very first line in the file.

If there are no search matches at all, EditPad will briefly flash the Count button's icon to indicate failure. If there are a lot of search matches, folding them all might take a while. The status bar will indicate EditPad's progress.

Using Fold Lines together with Highlight All is a very quick way to get a condensed view of all the matches in the file. Unlike the match highlighting mode, Fold Lines is automatically disabled when you switch between files, or edit the search term. Click the Fold button again to refold the current file. Folding a file based on search matches deletes all automatic folding points, and all folding points that you created. When you disable the search match folding, new automatic folding points will appear. Also unlike match highlighting, which instantly updates itself, the folding is not updated as you insert or delete the search term while you edit the file.

After folding the lines with search matches, you can use Fold|Copy Visible Lines to copy the lines with search matches to the clipboard, and Fold|Delete Folded Lines to delete the lines without search matches. However, since folding keeps the first line visible, the very first line in the file will be copied or remain behind, even if it doesn't have any search matches.

See also

Search Menu
Search|Prepare to Search
Search|Highlight All
Search|Count Matches
Fold|Copy Visible Lines
Fold|Delete Folded Lines