Hacker News new | ask | show | jobs
by mcepl 751 days ago
https://github.com/BurntSushi/ripgrep ???
3 comments

The author specifically mentions, and benchmarks against, ripgrep in the linked content.
ripgrep is brilliant and I use it a lot but it has no knowledge of the languages it works with so I don't use it for searching anything more than names of functions or stuff.

If you really need to search for code constructs that can span multiple lines (but not always do) then Treesitter-aware tools like ast-grep and gritql are superior.

Ripgrep lacks the “& replace” bit.
Nah.

   $ rg 'sear' -r 'repl' file.txt
That only replaces in the output. ambr seems to actually modify the file contents, like `sed -i`. ripgrep never modifies the contents of files.
Right, can use --passthru and > or sponge to write it to disk.

Edit: Oh, it's you. Thanks for a brilliant tool, I use it every workday and have been for years.