I would like to create a package that enables filtering lines containing a certain string similar to the KEdit command “ALL”.
This is different from using “Project Find Results” on the opened file because of two things: The ALL command does not open up a new TextBuffer, it just hides all the lines not containing the given string. Also, and this is the main advantage, it allows you to perform edits on the filtered lines right away (no need to click on a specific line, do some edits, switch back to the find results and go to the next line etc.).
Another nice feature is, that once lines were filtered using “ALL”, you can use “LESS” to reduce the results by lines containing a certaing other string, or “MORE” to do the opposite.
Now my question is, how could a package providing this functionality look like? I wouldn’t mind opening a new TextBuffer, but at least I want to be able to do edits within that TextBuffer resulting in the correct changes to the original file. Folding does not seem to be an option as I could not find a way to set Folding levels manually.
Thanks for your help!