My projects are in:
However, at times I hit CtrlP and I haven't opened a file in a particular project, so my working directory is
/home/user. CtrlP starts indexing this whole directory, which is huge and takes a whole lot of time every time I accidentally hit CtrlP. How can I avoid this? I have seen that I can exclude files and directories using Vim's wildignore and CtrlP's own g:ctrlp_custom_ignore, but that doesn't work as I can't ignore a parent directory and still search in a child directory. Any ideas?
Alternatively, I would also be happy with Vim automatically making
/home/user/projectA the default working directory, just to avoid ever having
/home/user as the working directory.