2

I use CtrlP with vim, installed it with Plug and have it set up mostly to default settings. Whenever I use the plugin though, it seems to search through all my files on my entire machine. So instead of looking for the nearest .git directory or just using the current working directory, it literally searches everywhere.

While I have been searching for the issue several times, I can't seem to find any solution. I vaguely remember finding something related to Mac but the fix not working for me.

I barely changed any of the CtrlP configuration settings, but here's what I have:

let g:ctrlp_cmd = 'CtrlPMixed'
let g:ctrlp_working_path_mode = 'ra'

I'm running vim 7.4 on Mac OS X 10.10.2, here's a bit of vim --version:

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Feb 10 2015 09:51:02)
MacOS X (unix) version
Included patches: 1-488
Compiled by Homebrew
10
  • What directory are you starting CtrlP from? If you start it from your home directory, it will have to search a lot of unneeded files.
    – akshay
    Apr 7, 2015 at 8:42
  • I start Vim from within my projects git repository. Usually the root directory of the repo, sometimes in a subdirectory. Apr 7, 2015 at 8:43
  • 1
    Is the behavior also reproducible with :CtrlP or :CtrlPCurWD?
    – akshay
    Apr 7, 2015 at 8:51
  • 1
    Hm, thanks anyway! I've opened an issue, hopefully it'll get fixed soon... Apr 7, 2015 at 9:02
  • 1
    yeah, @akshay linked that a few comments above, it's at github.com/ctrlpvim/ctrlp.vim and I've installed it, but that still doesn't solve my issue. Apr 8, 2015 at 8:49

1 Answer 1

1

It's possibly your working path mode - check the ctrlp help for g:ctrlp_working_path_mode. I'm not sure what the default is, but I seem to recall that when I didn't explicitly set it I also got weirdness. Since I am mostly working in source controlled projects I use let g:ctrlp_working_path_mode = 'r' but otherwise using let g:ctrlp_working_path_mode = 'c' might also help.

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.