many files not findable #325

Open
dyfrgi opened this Issue Dec 6, 2012 · 7 comments

Projects

None yet

7 participants

@dyfrgi

$ cd ~/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/test-unit-2.5.2
$ ls lib
test test-unit.rb
vim .
^p
test-unit.rb
== NO ENTRIES ==

I'm not sure why, but for some reason nothing in subdirectories of gems under ~/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems gets found. This is rather annoying if I'm exploring the code of a gem in there.

If I copy the directory into my homedir, it does then work, though it's rather slow since the root it finds is in fact ~.

I think this is an actual issue, though I'm open to the idea that PEBKAC.

@dyfrgi

Further investigation shows this is due to max_files. There are, uh, a lot of gems in there, and the root it's finding is probably ~/.rbenv, as that's a git repository. Going to have to think about reasonable roots to make this work. It also might work to have CtrlP load nearby files first, before loading ones which are further away. Or maybe say something when the max files is hit, instead of just silently ignoring a bunch of files that it seems like should be found?

@kien
Owner

Duplicate of #313. But good idea about adding an indicator for hitting max_files. I'll see what I can do.

@rainerborene

One possible solution is to verify if the .git directory exists under the current gem directory..

@DeMarko

A message when max files is hit would be awesome, I was unaware of this because of ignores I had already reached the default 10k limit but CtrlP only showed itself as indexing 5813 so I thought it was some other issue.

@timc3

I just noticed that because the match window is not scrollable it was always missing files that I was looking for.

@marr

Added that to .vimrc fixed for me:
" Unset cap of 10,000 files so we find everything
let g:ctrlp_max_files = 0

@ncjones

This issue caught me by surprise when I switched from Command-T to CTRLP. My current workaround is to use the VCS ctrlp_user_command as per the docs:

  let g:ctrlp_user_command = {                               
    \ 'types': {
      \ 1: ['.git', 'cd %s && git ls-files'],                
      \ 2: ['.hg', 'hg --cwd %s locate -I .'],               
      \ },                                                   
    \ 'fallback': 'find %s -type f'                          
    \ }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment