Comment by TacticalCoder
3 years ago
I mostly use fuzzy searching, not exact matching, it's so convenient.
From Emacs, I just don't search in org-mode, I search into typically my entire user directory, in both .txt files, source code files, .org files, etc. using "counsel-rg" (just a wrapper around ripgrep).
It's super quick. I enter, say, at the Emacs rg prompt:
gmp lib
So that's "gmp<space>lib" and it'll find every line, in any single file, no matter it's format, where, on the same line, there's "gmp" followed by, anywhere else later on the line, "lib", no matter the capitalization.
The wrapper around rg takes care of calling it with the correct magic invocation.
Say I type: "pi rypi" then Emacs/counsel shall spawn a call to rg looking like this (it's configurable):
/usr/bin/rg --max-columns 240 --with-filename --no-heading --line-number --color never -i "(pi).*?(rypi)"
And, well, I much prefer to enter simply "pi rypi" and have "(pi).*?(rypi)" generated for me.
I've got the call to "counsel-rg" assigned to a shortcut.
I use it all the time.
P.S: ripgrep is an amazing tool written an HN'er, burntsushi. It's really fast and, by default, won't search into many files you don't care about anyway. It is so fast that on my relatively modern machine (AMD 3700X / NVME M.2 PCIe 3.0x4 SSD) I don't bother and typically search from the root of my home directory.
I love fuzzy searching, it should be an option in all text search boxes everywhere (and rg is also great), but this is just not a properly scoped search workflow, it's just too valuable to be able to limit search to document/project/... before reaching for everything
Doom has `space s D` for this
https://github.com/doomemacs/doomemacs/blob/master/modules/c...