Hide all then show search results
-
Hello,
Long ago I used the ISPF editor, and it had the ability to hide all lines, do a search, and it would only show lines where the result was found. Then these lines could be easily deleted, copied, etc. Is there a way to do something similar in NP++?
Thanks.
-
hide all lines
No, not in the sense you mean.
easily be copied
Yes, 2 ways at least: Copy from the
Find-result
window after doing aFind All in Current Document
search. Or use theLine Filter
plugin which will provide matched lines in a different tab. Either way it is fairly easy to copy the hit lines.easily be deleted
The best way is to do this via Regular Expression replacement. Search for what you what to delete and replace it with nothing.
If you can tell us your typical use-case, we can probably refine this advice to something more specific.
-
I too am a former user of ISPF, and where this shines, is after you hide a range of lines (all lines, lines 47 through 397, etc), you can then do a find, and it will un-hide the lines that contain your search text. You can also (if I remember correctly) search only displayed lines, etc. And commands such as indenting blocks, etc. could be done on just visible lines.
Where I find the need currently for this, is the ability to hide a range of lines (not just folding/collapsing a language-specific block of code) to be able to “zoom in” on arbitrary ranges of lines.
-
It certainly would be good to have some sort of robust hidden/shown line features like you discuss!