I'm sure this will have been asked before, but I can't seem to find a solution.

I tend to open Vim from the root of my project, let's say:


Which looks something like:

| - app/
|  | - scripts/
|  |  | - ...
|  | - styles/
|  |  | - ...
| - index.html
| - Gruntfile.js
| - README.md

When I open Vim from the project directory, I only want CtrlP to index these files and subdirectories.

Instead, I seem to get indexes for all of the root's sibling directories too and sometimes even further up. This becomes pretty annoying when I want to find a file with a common name across all my projects.

As far as I remember, I've only ever changed one configuration setting for CtrlP and it's the ignore directive:

let g:ctrlp_custom_ignore = 'bower_components\|node_modules\|vendor\|.git|static\'

Is this the default behaviour and if not, how can I change it?


2 Answers 2


If I'm not mistaken, you want to change g:ctrlp_working_path_mode: https://github.com/kien/ctrlp.vim/blob/master/doc/ctrlp.txt#L178

let g:ctrlp_working_path_mode = '0'

I would check your :pwd. I think you are probably not in the directory you think you are. CtrlP default searches start at your current working directory so you shouldn't be seeing the issues you are unless you are actually in a different directory. The only other option is if you run the function supplying a starting directory like this.

:CtrlP <directory>

If all else fails, try downloading the latest CtrlP and see if there was a bug or if your plugin files were accidentally modified.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.