Closed net closed 6 years ago
The output format is decided by ripgrep currently. I have done very little to improve that but have been thinking about making the looks of the output a bit more clear. So your suggestion is very welcome.
Since the output is just "piped" into the result-buffer I am not sure what would be possible to do here but I will definitely look into this.
Thanks for the report.
I have just played around with this a bit but this is currently my plan.
Add a custom variable rg-match-pos-separator
(naming to be decided) that can control the character used as separator. Using space here would "hide" it.
Also adding custom variable rg-align-match-pos
that turns on/off alignment.
Default algnment to be decided but probably 5 digits for line and 3 for column. That would allow for about 100000 lines and 1000 columns to look good. That should be enough for most cases but I will also add custom varables for these values so that the alignment could be tweaked.
I'm excited to hear that!
Do you think a default of 4 or even 3 for line alignment would be sufficient? I suspect searching a file with 100,000 lines is a fairly rare case for most users that can be configured for if desired.
Unfortunately this breaks wgrep
support so currently on hold although the implementation is essentially finished.
There are also more problems with wgrep-ag
with a stalled solution upstream: https://github.com/mhayashi1120/Emacs-wgrep/issues/41
Possible solution would be to fork wgrep-ag
into this package and do local fixes here.
I've pushed a test branch, align_separator, with this feature. Needs a bit of fixing but you can try it out if you want. Will take a bit of time before this is merged to master.
Merged to master.
An option to pad line numbers or otherwise align results would be useful. Likewise, an option to change or hide the line number separator (currently a
:
) would help reduce visual clutter.