How to use vim's Ctrlp plugin instead of the default Fuzzy Finder menu
Agreed, I'm not sure I'm a fan of the 'batteries included' philosophy. The built-in fuzzy finder is significantly slower than fzf with ag.
I think the appearance is amazing, but the matcher algorithm is not good.
Using a configurable fuzzy finder and defaulting it to something like fzf would be great.
As far as I know, there is/was talk about using something like ag / ripgrep to replace the current search algorithms. There is a bit of talk about this over in #574.
Working on fixing the algorithm right now... If someone wants to enable the ability to use ctrlp or fzf that would be welcome but it's not in my current plan.
_Sent from my Lge RS988 using FastHub_
Agreed, I'm not sure I'm a fan of the 'batteries included' philosophy. The built-in fuzzy finder is significantly slower than fzf with ag.
Yes, for sure - ideally we would want to be on-par with it out-of-the-box. The 'fallback' when we are not in a git repo is especially slow. It's especially painful since, until #633, there isn't a good way to opt out of this default.
There are a couple options:
unbind, from config.js - this would be ideal if you don't prefer Oni's UI and would rather use CtrlP in entiretyeditor.quickOpen.execCommand to run your a CLI fuzzy-find program of your choosing (ag, etc). You just need to construct the command correctly - Oni will replace a ${search} with the query in the fuzzy finder. This would be preferable if you like the UI, but want something faster or more purpose built.I like the idea of using ripgrep or something out of the box, it seems to work well for VSCode and there is an npm package to get the binary (which we could include in Oni).
Also, @joereynolds , regarding:
Agreed, I'm not sure I'm a fan of the 'batteries included' philosophy
Let me know if QuickOpen is the main pain point here, or there are other places that cause problems. I want to make sure as we introduce customization (#633, etc) that we can address scenarios. I know like #654 is another place 'batteries included' causes problems.
I think another issue that the search command doesn't address while I'm fixing quickopen is that fuse is very slow...
If you have a lot of files it updates really laggy and very unresponsive, this is something I hope to fix in my PR but I'm really busy this week, I will do my best to address it soon.
Btw, my latest change in #635 has sped our fuzzy finder up a lot, it has a default walking method if git ls-files doesn't work now, and it's fast, and it caches on directory change and it loads files as you type that way it doesn't wait for them to all load before you can do stuff.
Hey @extr0py to be honest it's mainly the fuzzy finder which I know you're addressing.
My thoughts are, if you're forcing us to use something, we should be able to swap it out :)
PR #633 is merged now, so you can opt-out of the behavior by adding this to your oni config:
const activate = (oni) => {
// Remove default behavior of `control+p` key
oni.input.unbind("<c-p>")
}
module.exports = {
activate,
// other config options here...
//"oni.useDefaultConfig": true,
// ...
}
Of course, you'll need to grab the bits from latest master, as the oni.input API isn't available in a release yet. I'll close this for now, but let me know if you have any questions!
Thanks for the response. How would I simply change the binding instead of deactivate it? _i.e._ how can I change the
Hi, @kheaactua
You can see some API usage here: https://github.com/TalAmuyal/MyConfigs/blob/master/dotfiles/oni-config.js
Hope it helps :)
it does, thanks!
Most helpful comment
PR #633 is merged now, so you can opt-out of the behavior by adding this to your oni config:
Of course, you'll need to grab the bits from latest master, as the
oni.inputAPI isn't available in a release yet. I'll close this for now, but let me know if you have any questions!