Last Updated: May 23, 2018
· gshutler

CtrlP root markers

If you have a large repository with sub-projects you can specify a custom file on top of the regular .git files by adding a line to your .vimrc:

let g:ctrlp_root_markers = ['.ctrlp']

Then a simple:

$ touch .ctrlp

Will mean CtrlP will now root itself within that directory rather than continuing up the stack to find your .git directory.

For bonus points also add .ctrlp to your ~/.gitignore_global ( so you don't have to add it to all your project .gitignore files.