Ctrlp is a fuzzy finding file
matcher that pops up at the bottom of vim when it’s control p is pressed
(or your custom binding). It’s a huge timesaver to quickly be able to
jump to to
control p then
One frustration with ctrlp is that it tries to index everything but stops at around 6000 files (by breadth first serach). This can leave files deep in your directory structure unavailable and add frustrating results to the listing. Luckily, it’s easy to fix with per project vimrc files.
Allow per project vimrc’s. In your main
" enable per-project .vimrc files set exrc " Only execute safe per-project vimrc commands set secure
.vimrcto your project root and add:
set wildignore+=tags set wildignore+=*/tmp/* set wildignore+=*/vendor/* set wildignore+=*/spec/vcr/* set wildignore+=*/public/* set wildignore+=*/chef/* set wildignore+=*/coverage/* set wildignore+=*.png,*.jpg,*.otf,*.woff,*.jpeg,*.orig
You might need to adjust the vimrc to suit your project. This has been a huge timesaver for me and resulted in faster file finding and more relevant results.
On final tip, if after adding this you still don’t seem the right
results you may need to clear the ctrlp cache. You can do this by going
~/.cache/ctrlp/ and removing any files that match your directory