2

If I open up vim and use ctrl-p, and type in a file I am looking for:

"fancy_service.js"

my fancy_service.js file does not show up in the results...

Yet if I type in:

"assets/fancy_service.js"

then I see the result:

app/assets/javascripts/my_app/services/fancy_service.js

...

Can anyone please tell me why ctrl-p cannot find my files without putting in a fragment of the path?

patrick
  • 9,290
  • 13
  • 61
  • 112

1 Answers1

0

This should be found by ctrlp.vim. The related configurations are:

  • g:ctrlp_max_files
  • g:ctrlp_max_depth

However, if you configured g:ctrlp_user_command they will be ignored.

The original repo is no longer maintained, so it's better to try this active fork: https://github.com/ctrlpvim/ctrlp.vim

Tacahiroy
  • 643
  • 4
  • 16
  • Yeah, I said in the comments above that max_files and max_depth do not fix the problem... I tried doing: let g:ctrlp_max_files = 500000 and let g:ctrlp_max_depth = 5000000, and it still can't find files my project. – patrick Jan 21 '15 at 19:26
  • I guess you have set something to *g:ctrlp_user_command*, if so those variables would be ignored. In this case, bunch of lines are matched to "f\*a\*n\*c\*y\*_\*s\*e\*r\*v\*i\*c\*e\*.\*j\*s", that's why couldn't narrow down results enough. Probably, you can use *filename* mode instead of *full-path* mode. In this mode, ctrlp.vim tries to find files only that mathced pattern what you inputted. To change to *filename* mode, you just press ** in the ctrlp window. This is mentioned around `:help ctrlp-`. – Tacahiroy Jan 30 '15 at 08:26