You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would sometimes be very useful to show not only the matching line ("Text" column, "Context" Radiobutton) but also additional contextual lines before / after the matching line, similar to how grep --after-context=3 / grep --before-context=3 works in GNU grep.
I can see where showing the context at all times could be very complicated, visually: Search Results would need to display multiple lines in the Text column, yet still be a single selectable row. That sounds like it could require a more complicated grid control.
As an alternative, how about adding an icon column to the results in Content view, and displaying the matching text with context when hovering on the icon? The window that displays on hover could then format the matching text to make it stand out.
I think it may be appropriate to limit the number of columns shown in context, not just rows. Some of the files I work with have very long lines of text -- over 500 characters. Even today (version 2.0.8), when reviewing results in Content view, hovering on the Text column frequently displays the tooltip/hover text, and even that is chopped off. Trying to display context in the middle of these very long lines could require line wrap in order to show the line with the match, and also the very long lines above/below.
Instead, I suggest showing a maximum number of columns in the context. If the matching line is longer than the max columns, the context should position the matching text near the center (left-to-right) of the window, and then show the corresponding columns from the lines above and below.
Just ideas to get the juices flowing.
P.S. Thanks for continuing to develop GrepWin. I use it multiple times a day, every day.
Apart of the above's proposals, some additional info :
showing the whole line containing the matched string,
which means showing text at the left & right sides of the matched string,
is called a horizonal context
showing lines above & below the matched string line is called a vertical context
the both contexts are useful :
a horizonal context is most useful
a vertical context provides additional usefulness in some cases (like source code files, logs)
as an example, a vertical context is available in : dnGrep and SublimeText
It would sometimes be very useful to show not only the matching line ("Text" column, "Context" Radiobutton) but also additional contextual lines before / after the matching line, similar to how
grep --after-context=3
/grep --before-context=3
works in GNU grep.Previously requested in #87
The text was updated successfully, but these errors were encountered: