How do I use 'wildignore' in Vim?

后端 未结 4 1601
滥情空心
滥情空心 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 10:50

    Because the title doesn't correspond to the best answer her is mine which corersponds not to ctrlp but to wildignore. Based on https://stackoverflow.com/a/579886/1170940

    Vim will ignore file patterns specified in option wildignore , so you can set them like so:

    :set wildignore=*.o,*~,*.pyc
    

    For example, my wildignore looks as such

     set wildignore+=*/node_modules/*,_site,*/__pycache__/,*/venv/*,*/target/*,*/.vim$,\~$,*/.log,*/.aux,*/.cls,*/.aux,*/.bbl,*/.blg,*/.fls,*/.fdb*/,*/.toc,*/.out,*/.glo,*/.log,*/.ist,*/.fdb_latexmk
    

    I use it for both ctrlp and NERDTree

提交回复
热议问题