loccur icon indicating copy to clipboard operation
loccur copied to clipboard

[Feature request] Show user configurable lines above and below the matching lines for context

Open kaushalmodi opened this issue 9 years ago • 1 comments

Hi,

Thanks for developing this package.

I was trying out your package to see how many (interactive) functions this package has. It works and shows all the lines matching with interactive. But it misses the context.

It would be helpful to also show few lines (user configurable) on the top and bottom of the matching lines just as the -A and -B options in popular search tools like grep and ag.

-A NUM, --after-context=NUM Print NUM lines of trailing context after matching lines. Places a line containing -- between contiguous groups of matches.

-B NUM, --before-context=NUM Print NUM lines of leading context before matching lines. Places a line containing -- between contiguous groups of matches.

Can you please make the options analogous to -A and -B user configurable?

Thanks.

kaushalmodi avatar Mar 04 '15 03:03 kaushalmodi

Hi, Thanks, actually you are not the first one asking for context. I'll think about how to add this feature.

fourier avatar Mar 06 '15 16:03 fourier