ctrlpvim / ctrlp.vim

Active fork of kien/ctrlp.vim—Fuzzy file, buffer, mru, tag, etc finder.
ctrlpvim.github.com/ctrlp.vim
Other
5.57k stars 259 forks source link

Make user command respect ignore ? #554

Closed motorto closed 3 years ago

motorto commented 3 years ago

Really liking this plugin,

On my vimrc I have this

let g:ctrlp_user_command = 'find %s -type f'  " Linux/Mac

let g:ctrlp_custom_ignore = '\v[\/](.cache|.config|.mozilla|.zoom|node_modules|target|dist)|(\.(swp|ico|git|svn))$'

And according to the wiki:

by default, |wildignore| and |g:ctrlp_custom_ignore| only apply when |globpath()| is used to scan for files, thus these options do not apply when a command defined with |g:ctrlp_user_command| is being used

So is it possible to make my user command respect the g::ctrlp_custom_ignore ? I couldn't find anything on the wiki about that.

tacahiroy commented 3 years ago

There is no way to achieve that by setting some variables unfortunately. You need to write some code to apply g:ctrlp_custom_ignore to the user command which you defined.