I'm having a lot of trouble figuring out the syntax for the wildignore
setting in Vim.
Suppose I want my file finder plugin (I use Ctrlp, which uses wildignore
) to not search through hidden files and folders, that is, files and folders prefixed with a .
.
How would I go about doing that?
Concerning ctrlp.vim
and wildignore
specifically, if you type :help ctrlp-options
and read a bit, you will find:
Note #1: 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.
Thus, you may need to unlet g:ctrlp_user_command
(possibly set to a default command) to actually use wildignore
. For instance, in your ~/.vimrc
, add:
if exists("g:ctrl_user_command") unlet g:ctrlp_user_command endif set wildignore+=.*
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With