Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to show the N lines before/after a filtered line for additional context #6

Open
DavidAnson opened this issue Jan 18, 2015 · 1 comment

Comments

@DavidAnson
Copy link
Member

This would be similar to how diff-ing tools show 5 lines before/after a diff. N should be configurable.

@JonnyOThan
Copy link

(Copying my comment from an issue I opened before noticing this one)

Suppose I have a lot of lines like:
A
A
A
B
A
A
A
B
A

The "B" line is essentially a marker, and what I'm really interested is in the "A" line immediately preceding the "B" line. But there are lots of "A" lines in the file that I don't care about.

I'm not entirely sure what the best way to specify something like this would be:

Maybe in the Edit Filter window there could be a bit of UI that says "include nearby line ranges" where you can enter some numbers like "-3,-1" to include the 3 lines immediately preceding the one that matches the filter.

Another possibility would be to allow for a compound filter made up of several single-line filters where each filter has to match a consecutive line. This might address some of the use cases in #30 as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants