Earlier quoted context omitted.
Vim is almost broken for me without fzf+rg. Feels like I’m manually grinding coffee instead of using electricity.
This comment got me to get out my French press and manually grind some beans. It wasn't a meditative and calming as I remember, and the coffee tastes a little...dusty. I guess it's time for me to update my vimrc.
Ripgrep is faster than grep, ag, Git grep, ucg, pt, sift (2016)
61–70 of 198 posts
Re: Ripgrep is faster than grep, ag, Git grep, ucg, pt, sift (2016)
#62It's fast indeed. And I can't help keeping promoting the combination with fzf :) For those who want to try it out, this is a Powershell function but the same principle applies in any shell. Does ripgrep then puts fuzzy searching in the resulting files+text on top while showing context in bat: function frg { $result = rg --ignore-case --color=always --line-number --no-heading @Args | fzf --ansi ` --color 'hl:-1:underl…
function frg {
result=`rg --ignore-case --color=always --line-number --no-heading "$@" |
fzf --ansi \
--color 'hl:-1:underline,hl+:-1:underline:reverse' \
--delimiter ':' \
--preview "bat --color=always {1} --theme='Solarized (light)' --highlight-line {2}" \
--preview-window 'up,60%,border-bottom,+{2}+3/3,~3'`
file="${result%%:*}"
linenumber=`echo "${result}" | cut -d: -f2`
if [ ! -z "$file" ]; then
$EDITOR +"${linenumber}" "$file"
fi
}Re: Ripgrep is faster than grep, ag, Git grep, ucg, pt, sift (2016)
#63It's fast indeed. And I can't help keeping promoting the combination with fzf :) For those who want to try it out, this is a Powershell function but the same principle applies in any shell. Does ripgrep then puts fuzzy searching in the resulting files+text on top while showing context in bat: function frg { $result = rg --ignore-case --color=always --line-number --no-heading @Args | fzf --ansi ` --color 'hl:-1:underl…
fza = "!git ls-files -m -o --exclude-standard | fzf -m --print0 | xargs -0 git add"
With that in the [alias] section of a gitconfig file, running git fza brings up a list of modified and not yet added files, space toggles each entry and moves to the next entry.That alias as well as fzf+fd really speed up some parts of my workflow.
Oh and shameless plug for my guide on what to include in your zsh setup on macOS: https://gist.github.com/aclarknexient/0ffcb98aa262c585c49d4b...
Re: Ripgrep is faster than grep, ag, Git grep, ucg, pt, sift (2016)
#64What are the reasons for grep not being replaced/improved? This topic seems a bit old by now.
Re: Ripgrep is faster than grep, ag, Git grep, ucg, pt, sift (2016)
#65I use ripgrep with the Emacs packages project.el (comes out of the box) and dumb-jump (needs to be installed). This may not be the most popular way of using rg but I have been very pleased with the overall experience. All it takes is running package-install to install the dumb-jump package and configuring the following hook: (add-hook 'xref-backend-functions #'dumb-jump-xref-activate) The Xref key sequences and comma…
Author of ripgrep here. Looking at your regex---just by inspection, I haven't tried it, so I could be wrong---but I think you can drop the --pcre2 flag. I also think you can drop the second and third \b assertion. You might need the first one though.
Re: Ripgrep is faster than grep, ag, Git grep, ucg, pt, sift (2016)
#66One thing I wish ripgrep had is support for AND conditions.
rg -P '(?=.*pat1)(?=.*pat2)(?=.*pat3)'
You could create a shell function shortcut if you need to use it often. But yeah, having it as a feature of the tool itself would be nice.Re: Ripgrep is faster than grep, ag, Git grep, ucg, pt, sift (2016)
#67It's fast indeed. And I can't help keeping promoting the combination with fzf :) For those who want to try it out, this is a Powershell function but the same principle applies in any shell. Does ripgrep then puts fuzzy searching in the resulting files+text on top while showing context in bat: function frg { $result = rg --ignore-case --color=always --line-number --no-heading @Args | fzf --ansi ` --color 'hl:-1:underl…
Re: Ripgrep is faster than grep, ag, Git grep, ucg, pt, sift (2016)
#68Earlier quoted context omitted.
Author of ripgrep here. Looking at your regex---just by inspection, I haven't tried it, so I could be wrong---but I think you can drop the --pcre2 flag. I also think you can drop the second and third \b assertion. You might need the first one though.
The example I have posted in my comment is not a command I am typing myself. The dumb-jump package generates this command for us automatically. It is possible to customize the command it generates though. Indeed while running ripgrep manually, I do not use the --pcre2 option. Thank you for developing and maintaining this excellent tool!
Re: Ripgrep is faster than grep, ag, Git grep, ucg, pt, sift (2016)
#69What are the reasons for grep not being replaced/improved? This topic seems a bit old by now.
Re: Ripgrep is faster than grep, ag, Git grep, ucg, pt, sift (2016)
#70Earlier quoted context omitted.
This comment got me to get out my French press and manually grind some beans. It wasn't a meditative and calming as I remember, and the coffee tastes a little...dusty. I guess it's time for me to update my vimrc.
Aeropress is a direct upgrade from french press and uses way less coffee