What I need
a fast/performant way to open any file under a large (git) repo (~9.8k files).
Context
I have tried various solutions, like Textmate.el and find-file-in-repository. I found these solutions via previous SO questions like this and this and through the LocateFilesAnywhere EmacsWiki.
While both solutions work wonderfully for small-to-mdeium repos, in this case they are practically unusable. When I start typing a filename, there’s a delay of several seconds before I see any result. And changing any part of the search is very laggy too.
I think the main problem is that on typing any character, emacs/find-file-in-repository starts a shell command (git ls-files...). I really only need to do that when I have stopped typing.
Questions
- is there a better library out there for this use-case?
- if not, how can I introduce a delay into the command when I’m typing? i.e. while I’m in
find-file-in-repository, I want the find-command to be invoked only when I stop typing (let’s say a gap of 300ms).
Summary
After I received the three answers I tried them out (also answering my own question as none of the above solutions worked for me). I finally settled for
helm-ls-git. Here’s a comparison from my point-of-view:Projectile
.gitignore, the actual number of files is more like 52k.helm-cmd-t
GNU Global
event-jr‘s answer however opened up some more options: I was unaware of
helmtill now. Looking at melpa for helm related plugins I found the following:helm-gitpackage.elsince it’s in melpamagit– so this looked a good fit.magit-git-dir: symbol is voidkind of error. Did not dive in too much but looks like it needs to be updated. Opened up an issuehelm-ls-git