Be More Productive with Your Favorite Text Editor EditPad Pro Tips and TricksKeeping Only Lines with Search Matches You can use EditPad Pro's ability to fold lines in creative ways. In the Fold menu, you'll find various commands for folding and unfolding blocks of text. These commands only affect the way the text is displayed. By folding long blocks, you can get a better overview of the structure of the file you're editing. All editing commands continue to work on all the lines, whether they're visible or not. The only two exceptions are the Copy Visible Lines and Delete Folded Lines items in the Fold menu. While Edit|Copy copies all selected lines, Fold|Copy Visible Lines copies only those lines that are both selected and visible. Fold|Delete Folded Lines deletes all lines inside the selection made invisible by the folding. The Fold Lines command in the Search menu folds lines in a special way: all lines without search matches are folded under the nearest line above them that does have a search match. If the first line in the file doesn't have a search match, lines without matches at the start of the file are folded under the first line. The effect is that Search|Fold Lines leaves only lines with search matches, and the first line in the file, visible. This makes it trivial to keep only lines with search matches. First use Search|Fold Lines, then Edit|Select All, and then Fold|Delete Folded Lines. If the first line didn't have a search match, use Edit|Delete Line on it. To copy only lines with search matches to the clipboard, use Search|Fold Lines, then Edit|Select All, and then Fold|Copy Visible Lines. If you don't want to copy the first line, use Search|Fold Lines, then press Ctrl+Home, Arrow Down, Shift+Ctrl+End, and then select Fold|Copy Visible Lines. If this is too many keystrokes for you, you could always record a keystroke macro or two. |