How to let CtrlP (vim plugin) ignore pdf files?

241 views Asked by At

I am working under ubuntu on a latex document in vim and want to use the CtrlP-Plugin to open different files quickly.

When I press <c-p> the small window opens as expected but showing the generated thesis.pdf file as a first hit before the thesis.tex file which I actually want to edit.

This are the settings in my .vimrc (from the ctrlp-repo):

let g:ctrlp_map = '<c-p>' 

let g:ctrlp_custom_ignore = {
  \ 'dir':  '\v[\/]\.(git|hg|svn)$',
  \ 'file': '\v\.(exe|so|dll|pdf)$',
  \ }

How can I let CtrlP not show .pdf-files in the matches list (Because it makes no sense for me to open them in vim). What do I need?

1

There are 1 answers

0
SergioAraujo On

Yesterday I edited my .gitignore file and voilà, my beloved ctrl-p recognized this change, avoiding to show the extensions I added to gitignore file