0

I am using the vim Ctrl+P plugin for file searching,

All that is listed in my .vimrc is

let g:ctrlp_working_path_mode = 0
let g:ctrlp_custom_ignore = {
  \ 'dir':  '\.git$\|CVS$\|build|\.svn$\|target$',
  \ 'file': '\.class$\|\.so$',
  \ }
let g:ctrlp_extensions = ['dir', 'mixed']

But it does not seem to index any directories that have a - in them. Does anyone know how to fix this?

BananaNeil
  • 10,322
  • 7
  • 46
  • 66
  • `build|\.svn$\|`. You need to escape that pipe character. – TankorSmash Nov 17 '15 at 21:28
  • @TankorSmash That definitely helped speed up one of my projects.. but unfortunately does not fix my problem. – BananaNeil Nov 17 '15 at 22:30
  • I know it is probably unnecessary but did you check `set wildignore?` if there is nothing set of that sort? If you need to speed up your CtrlP (I answered this [here](http://stackoverflow.com/questions/32516838/how-to-run-call-ctrlp-first-time-in-the-background-vim/32520039#32520039)), you should use [Silver Searcher](https://github.com/ggreer/the_silver_searcher). – ryuichiro Nov 20 '15 at 15:09
  • 1
    Also are you using [the active fork of CtrlP](https://github.com/ctrlpvim/ctrlp.vim)? The original one is [unmaintained](https://github.com/kien/ctrlp.vim/issues/669). If nothing helps, you should probably visit [its issue tracker](https://github.com/ctrlpvim/ctrlp.vim/issues). – ryuichiro Nov 20 '15 at 15:09
  • Woah, thank you so much @ryuichiro - The problem was that I was using the old unmaintained `kien/ctrlp.vim` rather than the active fork, `ctrlpvim/ctrlp.vim`. If you write this as an answer, I'll accept it. – BananaNeil Nov 20 '15 at 17:46

1 Answers1

1

If you use CtrlP, be careful which version you use. There is no longer maintained kien/ctrlp.vim, and its active fork ctrlpvim/ctrlp.vim.

Also, if you need to speed up your CtrlP, you should consider to use Silver Searcher. The integration with Vim can provide ag.vim plugin. About ignore setting you can check this answer.

Community
  • 1
  • 1
ryuichiro
  • 3,765
  • 1
  • 16
  • 21