3

I'm using vim+ctrlp and I have a project who has multiple vendor folders, one in the root directory (for vendor packages), and another inside resources/views/vendor.

I have the following in my ctrlp ignore configuration

let g:ctrlp_custom_ignore = {
    \ 'dir':  '\.git$\|\.hg$\|\.svn$\|node_modules$\|vendor$\|smarty$\|static$\|node_modules',
    \ 'file': '\.exe$\|\.so$\|\.dll$\|\.pyc$\|\.png$'
}

Of course, this ignore both vendor directories. From the doc's of ctrlp

Note: to ignore a root directory "build", and not any directory with "build" in it, you can root the regex: ^build$

So I tried to add ^vendor$:

let g:ctrlp_custom_ignore = {
    \ 'dir':  '\.git$\|\.hg$\|\.svn$\|node_modules$\|smarty$\|static$\|node_modules\|^vendor$',
    \ 'file': '\.exe$\|\.so$\|\.dll$\|\.pyc$\|\.png$'
}

This doesn't work and now I see the root vendor folder. The root of ctrlp is correctly setted to the project root (where the vendor I wanna ignore is).

lcjury
  • 1,158
  • 1
  • 14
  • 26
  • 2
    This would appear to either a bug in the implementation or in the documentation. (I've just verified that the suggested solution doesn't work for me either.) I'd suggest opening an issue on the ctrlp repo. – pdoherty926 Jul 02 '17 at 21:51
  • 1
    Thanks @pdoherty926, I'm gonna follow that suggestion – lcjury Jul 03 '17 at 00:52

0 Answers0