3 ms·
Whenever a Vim post mentions grep, ack or ag — especially in conjunction with fzf/fzy — I'll make sure to mention the even faster rg (ripgrep): https://github.c
by lillesvin 9y ago
Whenever a Vim post mentions grep, ack or ag — especially in conjunction with fzf/fzy — I'll make sure to mention the even faster rg (ripgrep): https://github.com/BurntSushi/ripgrep https://github.com/BurntSushi/ripgrep BurntSushi's write-up about the internal workings of ripgrep is also super interesting: http://blog.burntsushi.net/ripgrep/ http://blog.burntsushi.net/ripgrep/)
It's a really amazing piece of software. It has also recently been included in Visual Studio Code to search in files.
- huntie 9y agoI use ripgrep and it's pretty great, but I don't know why Visual Studio Code would be using it. Why not just use Rust's Regex library instead?
- dfee 9y agoIs it? Funny because I have tmux open in the side pane, and execute my searches that way.
- lillesvin 9y agoYup: https://users.rust-lang.org/t/ripgrep-is-now-the-standard-text-search-provider-in-vs-code/10285 https://users.rust-lang.org/t/ripgrep-is-now-the-standard-te...
- lillesvin 9y agoI'm just guessing here, but ripgrep is an executable that they can bundle and write a simple wrapper around. VSCode isn't written in Rust so they'd have to write their own "grep" in Rust which most likely wouldn't be anywhere near as good as ripgrep. Or am I misunderstanding your question?
- burntsushi 9y agoWell, ripgrep uses Rust's regex library. If VS code used the regex library directly, then they would basically wind up re-creating ripgrep (or something very similar) itself.
- mightybyte 9y agoCompletely agree. I used to use ag, but its handling of .gitignore files is buggy and often returns a lot more results than it should. Switching to ripgrep made a pretty significant difference for me.