Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I have a repo with 3000+ files and I can't notice any delay searching with CtrlP. I have the following custom file listing command in my vimrc:

    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'
      \ }



Just made my CtrlP use ag[1], it's awesome now :-)

let g:ctrlp_user_command = 'ag --nogroup --nobreak --noheading --nocolor -g "" %s '

[1] https://github.com/ggreer/the_silver_searcher


It's fine with many files, the only issue is when it indexes, which can't easily be automated. I just checked and it gets through about 2000 files a second on my MBP.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: