@guy038 said:
Regarding the features under consideration :
You said :
Context in search results: that is, showing one or more lines before or after the line(s) containing a match.
This would be optional and configurable, but a tricky question is whether it is sufficient to configure it before the search or whether you should be able to request context — either for a specific match or for all matches — directly in the search results window, after the search.
Personally, I suppose that asking for 1 to 5 lines before / after the context, once the search ended, should be sufficient !
Making sure we understand each other precisely is important here.
Implementing context is not quite as simple as it sounds, but for Find All commands that create a search results list, it is much trickier if the context can be requested after the search is complete, rather than specified before the search is performed.
I do understand that it would be handy to look at search results and then say, “Oh, I need some context. Expand this to show me two lines before and three lines after each match.” It’s a lot more complicated to implement that than to have the user specify context requirements beforehand (e.g., a setting that says, “When I search, show me two lines before and three lines after each match”) and include those lines in the search results.
I’m not saying it’s impossible; just enough more complicated that it’s worth understanding how badly it’s wanted or needed before trying to do it.
If I implement requesting context after the search, should it be for an individual match (“show me two lines before and three lines after this match”), for all matches, or are both options needed?
You said
It seems like it would make sense for this to be available for Show actions, too.
Yes it would. I agree with your opinion !
The next release will include something vaguely like this: the ability to “expand” visible blocks (such as those resulting from Show) by showing one additional line before and after each. This can be repeated to show more lines as desired. It doesn’t give find-grained control, but it keeps things relatively simple, and it may prove to be good enough.