5 ms·
Fuzzy Finding with Emacs Instead of Fzf
- kungfufrog 3y agoSeems way more abstruse than just using fzf
- jimmyed 3y ago[flagged]
- mickeyp 3y agofzf won't work in shell-mode as it does not handle curses-like apps. Thus, `ezf.el' avoids that problem by using Emacs as the fuzzy searching facility. To say nothing of the fact that this is a fine example to re-use for, similar, needs where you need to receive and send back information in an ordered manner. (And helm is far more advanced than fzf is, as far as searching)
- dig1 3y agoAnother alternative is fzf.el [1] which wraps fzf. [1] https://github.com/bling/fzf.el https://github.com/bling/fzf.el
- signa11 3y agoand another one, from the author of consult/vertico/..., minad, is affe: https://github.com/minad/affe https://github.com/minad/affe
- whateveracct 3y agoI haven't C-x C-f'd much since installing that and adding keybindings to it. Amazing.
- tetris11 3y agoI always love reading these guides, and I will eventually give in and buy Mickey's book just as a quick peek into his overflowing mind.... but this article left me wanting for a fizzy completion engine in emacs. There is the emacs-fzf package, icicles, and various other vertical completion frameworks, but I essentially want something that pretends to be fzf at the Emacs level, without having to spawn background shell scripts
- xenodium 3y agoEmacs completion frameworks are handy within our beloved editor but also well beyond. A recent post I wrote: https://xenodium.com/building-your-own-bookmark-launcher https://xenodium.com/building-your-own-bookmark-launcher
- natrys 3y agoVarious vertical completion frameworks like vertico are essentially front-end UIs. You can choose underlying filtering and sorting/scoring algorithm by setting `completion-styles` variable. One popular choice here is the orderless package (which probably doesn't give "fuzzy" completion experience as most people call it I guess, orderless-flex does filtering but not heuristic based sorting like fzf does). There are some options outlined in the readme of fussy[1], which is a wrapper around them. There are some pure elisp ones, and some written in native languages (including fzf itself) interfaced with dynamic module (so FFI rather than subprocess). Does that qualify as Emacs level? [1] https://github.com/jojojames/fussy https://github.com/jojojames/fussy
- tetris11 3y agoYeah, I'm currently using orderless with vertico for my "fuzzy" needs, but I genuinely do find ido completion much faster and more practical 90% of the time.
- flylikeabanana 3y agoOrderless is probably the way to go for a “pure emacs” solution - its selling point is that you can feed whatever function you want into the completion framework, so if you feed a fuzzy completer then you get fuzzy matching. It’s also part of a relatively new completion stack (that includes vertico, marginalia, and others) that leverages the inbuilt emacs features instead of replacing them.
- cerved 3y agoI prefer vipe + vim
- dbalatero 3y agoIf you work on large repos at large companies using Vim or Emacs, my experience has been that most solutions seem to break down under the performance strain except for getting FZF in the mix. I've tried stock Telescope+neovim, Emacs+helm/ivy, etc.
- frfl 3y agoNever tried other solutions, but fzf + vim + ripgrep handle everything I've worked with without any real performance issues even on 500K-1M line repos. Of course they're no longer instantaneous at those line counts, but still in the order of seconds.
- dbalatero 3y agoYeah that's the stack I was running as well. I think we had like 15 million LOC or more and it was useable.
- flylikeabanana 3y agoAt that point, I’d be project-scoping to individual submodules rather than the whole monolith. For something like projectile, that would mean dropping a .projectile in the submodule root so my “rip grip in project” functions are scoped to the submodule, then using VC to mark the root where I need to expensively search the whole project.
- frfl 3y agoCould you explain more about this setup? I'm not familiar with "projectile". Is this https://github.com/bbatsov/projectile https://github.com/bbatsov/projectile the same thing you're referring to? Sounds interesting. What I've done recently is open my vim in the folder that contains all the organization's repos (the ones I've cloned) and just run ripgrep inside vim to find examples or references to whatever I've seeking. Seems performant enough even without doing anything except letting ripgrep ignore git-ignored stuff (default behavior of ripgrep).
- jrm4 3y agoTo go big here; I did Emacs for a year or two then gave it up because -- despite being probably the most theoretically powerful -- there's just too much friction. I don't know if it's been given a name, but this new wave of (usually Rust) shell tools that are great and seem obvious in retrospect (fzf, rg, etc) strongly feel like they're doing exactly right what Emacs has "failed badly" at. edit: And now that I think about it, the "failure of Emacs" thing feels a lot not going the old "Unix way, do one thing and speak text" ideals?
- deleted 3y ago[deleted]
- Barrin92 3y agoI don't really understand the point being made. Virtually every popular unix-like command line tool integrates with the popular Emacs frontends. It's as trivial as going `consult-ripgrep` or `projectile ripgrep` and so on. There's significantly more friction for me in praying I remember a hundred terminal commands and tools than just having an actual UI.
- jrm4 3y agoI mean the other way around? Living inside Emacs separates you from lots of "how everyone else does it" over time and is hard to integrate with "everything else" without TONS of work. To avail yourself of the full power of Emacs, it demands more "difference from everything else?"
- orange-mentor 3y agoAs a newcomer to Emacs in the past couple of months (my second try), I think I agree with you that it's a lot of work. But for the Emacs fans who've had success, that work pays them back because they can bend the editor to an extremely bespoke workflow. I'm unsure if it will work out for me long term but I can sort of see the appeal. No other tool even attempts to be what Emacs has become. So yeah, it's different from every other approach I've tried. But there's a chance it will work for me. Jury's out, though, and I am only now realizing that I'm going to have to put more effort into hacking my workflow than with other things I've used (Kakoune, Neovim, sublime, etc)