Use ripgrep in Emacs.
Ripgrep is a replacement for both grep like (search one file) and ag like (search many files) tools. It's fast and versatile and written in Rust. For some introduction and benchmarks, see ripgrep is faster than {grep, ag, git grep, ucg, pt, sift}.
This package is available on
MELPA Stable and
MELPA. Install with M-x package-install
RET rg
from within Emacs.
It is also available in GNU Guix as
emacs-rg. Install
with guix package -i emacs-rg
.
If you want to install manually just put rg.el
and the rest of the
elisp files somewhere in your load path and add require the package:
(require 'rg)
rg
and friends are autoloaded symbols which means it's also possible
to defer loading if you have autoloading setup.
This will setup the default key bindings in a non lazy way. If you care about startup performance see the next example.
(rg-enable-default-bindings)
See documentation for how to handle lazy loading.
rg.el
2.0.0 will use new default settings to improve look and feel,
more consistent key bindings etc. If you want to use the old defaults
add this to your init.el
:
(rg-use-old-defaults)
If you prefer to use a magit like
interface as a complement to regular key maps, replace
(rg-enable-default-bindings)
with (rg-enable-menu)
. The menus are
built with transient, which
means that the menus can be modified in the same way as in magit.
Info documentation is included in the package. Online documentation: https://rgel.readthedocs.io
- Install cask.
- Install dependencies:
make deps
- Run tests:
make test
See LICENSE.