the_silver_searcher icon indicating copy to clipboard operation
the_silver_searcher copied to clipboard

--vimgrep inconsistent. How to return 1 match per line?

Open squm opened this issue 3 years ago • 1 comments

How to make --vimgrep return same results as --novimgrep does, but keep the vim format

squm avatar Mar 22 '21 06:03 squm

I just discovered that this is possible by using --no-heading in place of --vimgrep This will output a "close enough" format.

--no-heading causes the filename prefix on each line of output, that's important. but it will not print the "column" number in each match, since it is one per line.

I did not find this anywhere inag docs. I just decided to try it after I found something about it mentioned in the ripgrep repo.

nebbish avatar Feb 10 '24 03:02 nebbish