How do I use 'wildignore' in Vim?

后端 未结 4 1573
滥情空心
滥情空心 2021-02-12 10:23

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

4条回答
  •  深忆病人
    2021-02-12 11:00

    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+=.*
    

提交回复
热议问题