phiresky / ripgrep-all

rga: ripgrep, but also search in PDFs, E-Books, Office documents, zip, tar.gz, etc.
Other
6.4k stars 148 forks source link

Multi-Line support #211

Closed DaKingof closed 3 months ago

DaKingof commented 4 months ago

I would like to be able to search multiple lines of files for programming work. Sometimes I have a snippet of code and I want to know in what files this snippet is cloned to. Also, I'm doing some educational software tinkering and it would be cool if I could use a symbol or character or option to allow my searches to allow any character or set of charters to be in between what I am searching for. For instance, any possible variable in a function could be searched for and it will still give me a result.

As a solution allowing --multiline like in RP would be awesome in my fzf search results! This would make the process 80x simpler. As for the second part, I pretty much said what I thought would work...I'm sure there may be some other ways we could allow searches to ignore parts of a document but I am not so seasoned in all of this. Just learning!

phiresky commented 4 months ago

rga already allows --multiline, no?

darrenldl commented 3 months ago

Would https://github.com/darrenldl/docfd (self plugging) fit your needs somewhat?

DaKingof commented 3 months ago

rga already allows --multiline, no?

It would seem to, but when special characters are used search results turn null. Typing / or $ among others breaks it.

EDIT: Sorry I must have missed your reply!