spf13 / spf13-vim

The ultimate vim distribution
http://vim.spf13.com
Apache License 2.0
15.56k stars 3.63k forks source link

ctrlp: Variable type mismatch for: g:ctrlp_custom_ignore #444

Open ghost opened 11 years ago

ghost commented 11 years ago

Setting g:ctrlp_custom_ignore in spf13's .vimrc seems to conflict with private customization of this variable in vimrc.bundles.local or vimrc.local

When I defined it myself, I get an error message when .vimrc is parsed, pointing at line 454.

Error detected while processing /Volumes/Data/uri/.vimrc
line 454:
E706: Variable type mismatch for: g:ctrlp_custom_ignore

More info: https://github.com/kien/ctrlp.vim/issues/417

jimmyye commented 11 years ago

And klen also answered:

Just :unlet it before setting it again.

unlet g:ctrlp_custom_ignore
let g:ctrlp_custom_ignore = ...
seyDoggy commented 9 years ago

unlet doesn't work since spf13-vim sets g:ctrlp_user_command. I've tried to unlet both g:ctrlp_user_command and g:ctrlp_custom_ignore but with no luck.

seyDoggy commented 9 years ago

Correction... the order in which you unlet the directives seems to matter.

" custom ctrlp ignore settings
unlet g:ctrlp_custom_ignore
unlet g:ctrlp_user_command
let g:ctrlp_custom_ignore = {
    \ 'dir':  '\.git$\|\.hg$\|\.svn$\|bower_components$\|dist$\|node_modules$\|project_files$\|test$',
    \ 'file': '\.exe$\|\.so$\|\.dll$\|\.pyc$' }