Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you are an Emacs user like me, you must try out the consult-ripgrep command from the peerless Consult [1] package by Daniel Mendler: search your whole project with ripgrep and get a live preview of every matching candidate all inside of Emacs!

[1]: https://github.com/minad/consult



And for those who are also on Emacs but on the Swiper/avy/ivy/counsel side of the fence, there's counsel-rg.

I use it since before burntsushi (who's here on HN btw)'s ripgrep was shipped with Debian stable!

> search your whole project with ripgrep and get a live preview of every matching candidate all inside of Emacs

I'm sometimes searching not just my project but my entire user dir or my entire shared drive, from Emacs. A NVMe PCIe 4.0 SSD (I'm using a WD SN850X which someone here recommended to me when I assembled my PC) is that fast and ripgrep too.


> Swiper/avy/ivy/counsel

What are these? They're not editors/IDEs.. or?


Oh, they are Emacs extensions.


Ah, thank you. My brain inserted a "not" in place of "also", so I read:

> And for those who are also on Emacs but on the Swiper/avy/ivy/counsel side of the fence

As "And for those who are not on Emacs but..."


En garde! If you're a Vim user, fzf.vim [1] can do this. :)

[1]: https://github.com/junegunn/fzf.vim


If you don't need live updating output, you can just set grepprg and get results in the quickfix list with :grep[!] (or the location list with :lgrep[!]).

  if executable('rg')
    let &grepprg = 'rg --vimgrep $*'
  endif
No need for Fzf/Telescope/Denite/DDU or anything else in that case.

See:

https://neovim.io/doc/user/quickfix.html#%3Agrep

https://neovim.io/doc/user/options.html#'grepprg'


used to do that with glimpse when i worked with very large codebases 23 years ago!

big fan of ag, ripgrep and burntsushi's rust work!


And if you want interactive support, try https://github.com/bombela/fzf.vim.rgfd

(shameless plug)


Yep, the consult suite and rg are two of my favorite things. And I'm not even a SWE.


am a big fan of the whole consult/vertico/embark stack of emacs plugins. They're fantastic.


deadgrep is nice too




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: