Well, it’s really Tim Pope you should be thanking. ;)
I’ve been using a remix of this trick for years and have tweaked it a bit since I rarely (never?) open image files with my text editor. Also, I’m a Python user , and those __init__.py files start to be a bit annoying to look at over time when I practically never want to edit those.
let g:ctrlp_user_command = [‘.git/’, ‘git ls-files -oc — exclude-standard | grep -Ev “(jpg|png|gif|__init__.py)$”’]
Hope this is helpful!