Im working on project that is in fact composed of several subproject, under a common git repository:
Project
- Sub Project A
- Sub Project B
- ...
I never work on the main folder, and always start from one of the sub projects, the problem is no matter what I try CtrlP always does the search starting from the main folder where the repo is.
I've tried a few settings from the project repo but no matter, such as bellow, but still can't get it to make any effect.
let g:ctrlp_working_path_mode = 'ca'
Any tips please?
Looking at the CtrlP docs suggests that you have three options:
let g:ctrlp_working_path_mode = ''
. It will then only search under Vim's current working directory, so just :cd
to one of your sub projects' directories.let g:ctrlp_custom_ignore = { 'dir': '\v[\/]Sub Project [AB]$' }
(untested).let g:ctrlp_root_markers = ['Sub Project A', 'Sub Project B']
. This should stop CtrlP from traversing up beyond those sub directories.I would suggest the first option since the others are a bit too hacky for my taste. The last option also didn't work for me in a quick test.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With