- One Tip a Week
- Posts
- One Tip a Week: ripgrep
One Tip a Week: ripgrep
From their docs:
ripgrep is a line-oriented search tool that recursively searches the current directory for a regex pattern.
In this screen shote, I’m in my copilot-extension-template project and I want to see where the word error
is.

Ripgrep respects your .gitignore
out of the box, meaning less noise from things like node_modules
, .git
, etc. Grep needs extra flags and manual exclusions, e.g.
grep -iR error . --exclude-dir={.git,node_modules}
Another example is searching for a function call in code where you want to show line numbers and file names.

rg -nH "createErrorsEvent\("
Breakdown:
-n
: show line numbers-H
: always show filenames (even with single file results)
Ripgrep is optimized for code. It's fast, has smart defaults, and easily shows relevant context. The above just scratches the surface. Check out the ripgrep user guide for even more ripgrep goodness. Even if you’re a die hard grepper, I encourage you to give this a go.
That’s it! Short and sweet. Until the next one!