ctrlp still searches the ignored directory

前端 未结 5 1651
生来不讨喜
生来不讨喜 2020-12-10 01:34

I tried to put ignored setting in .vimrc

But when I used the ctrlp to search under rails app folder

It still search the vendor fold

5条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-10 02:17

    wildignore may be used by other commands, the reason of failure for g:ctrlp_custom_ignore is g:ctrlp_user_command, for example, here is mine:

    if executable('rg')
        let g:ctrlp_user_command = 'rg %s --files --hidden --color=never --glob ""'
    endif
    

    For this case, rg has own ignore way, just put .git to .gitignore, rg will not search any files in .gitignore.

提交回复
热议问题