Hacker News new | ask | show | jobs
by latortuga 5032 days ago
A bunch of people have posted about Ctrl-P being slow but I've never had that problem. Here's my user_command:

    let g:ctrlp_user_command = "find %s -type f | egrep -v '/\.(git|hg|svn)|solr|tmp/' | egrep -v '\.(png|exe|jpg|gif|jar|class|swp|swo|log|gitkep|keepme|so|o)$'"
While the CtrlP window is open, hitting F5 will refresh the list of files and it's really fast. I'm on an SSD but it's still basically instant on every project I code in. I think it must have a slow default which gives people the impression that it's slow. After using both FuzzyFinder and Cmd-T for a long time, CtrlP has been easily the best of the bunch.
1 comments

If you are concerned about speed, it might be worth adding this line to your vimrc as well. This way, ctrlp will keep its cache (stored by directory), and you only need to rebuild it when you create new files.

  "Keep caches between sessions - f5 to refresh
  let g:ctrlp_clear_cache_on_exit = 0