Add ability to specify a custom ignore function, instead of just patterns #594

Closed
wants to merge 2 commits into
from

Projects

None yet

2 participants

@ludovicchabant

This makes it possible to customize the ignore patterns on a per-project basis... I do that by loading patterns for a given project from a ".ctrlpignore" file at the root of the project. Generally you don't need this, but for some codebases where the directory structure is not so clean, you kinda have to.

d11wtq commented Jul 23, 2014

Yes! I totally want this :)

You may want to see how I use it with my auto-ignore script (you just need to activate it with a ctrlpext#autoignore#init() in your vimrc) and an example of a .ctrlpignore file. Cheers :)

(after I play around with it more, I may release that auto-ignore script as a standalone Vim plugin)

Also, it's not very optimal right now (1 map lookup + 1 regex match per directory). I'll need to modify some more CtrlP code to fix that (probably some "before/after scan" hooks, so I can do only 1 map lookup for the whole project).

d11wtq commented Aug 8, 2014

Moved to ctrlpvim#16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment