Closed ydzhou closed 2 years ago
As far as I can see the code, using g:ctrlp_user_command
have limits specified by g:ctrlp_max_files
Interesting. If file is not loaded due to limit of g:ctrlp_max_files
, why can I see them if I keep typing more characters?
rendering become heavily when too many files given. So I added code to omit lines over the limit. So you can get matched item if you type some.
Can you point me to the code? How do you think about making this as an option? I can help with the code change.
I think I find out the root cause why more relevant files are shown up. Can you take a look at the PR?
Looks like the root cause is actually the performance of fuzzy matcher... Maybe this is a constraint of vimscript.
Every new character you type requires a re-run of fuzzy matcher on all the files and it is performance draining. So current code exists the matching if it "find" enough. But "found" one might no be the best candidate... This problem is harder than I thought 🤔
closable?
Yeah please
My
CtrlP
setup to usefd
to scan files.When I search
vimrc
in my home directory, those more unrelated results show up but not the actualdotfiles/vim/vimrc
Here is my setup
If I do not use user command
fd
to scan, it works. If I usefd
but change settings ong:ctrlp_match_window
to bebottom,order:btt,min:5,max:30,results:2000
, it also works.That's why I am wondering if there is a limit on how many scanned files
CtrlP
can read from an external scanner. Do you have any thought?