emacs find file in project on a big project
A github rep for my concoction is here: https://github.com/lewang/anything-project-files
I added a few more anything sources so that anything-project-find can be a drop-in replacement for "C-x b". So the idea is when you hit "C-x b" you are completing against existing buffers, recent files through recentf (personally I hack it to use "session.el" instead, but it's a small diff), files in current dir, files in current project. I find it pretty handy.
I've used this for a while, but it's not well tested, so please report any bugs you find.
Depends what you mean by fuzzy matching. Most fuzzy matching is inherently slow, but some lightweight, pseudo-fuzzy algorithms are pretty fast. Generally speaking, you're probably better off with a regexp search, not a fuzzy-match search.
Anyway, there are two parts to the question:
- Defining a project as a given set of files and directories.
- Searching through the project files & directories -- all or some
Icicles can help with both:
Project definition, management, etc.
Searching a project or parts of it:
Searching file content (and search-and-replace)
Locating files
You can try gpicker. If you pass -t guess
, it will try to figure out relevant files though scm backend such as git.
I use following snippet to find file in project, where the project root is determined by eproject.
(require 'iy-dep)
(defcustom iy-gpicker-cmd (executable-find "gpicker")
"Default font"
:type 'file
:group 'iy-config)
(defun iy-gpicker-find-file (dir)
(interactive
(list
(or (and current-prefix-arg (ido-read-directory-name "gpicker: " nil nil t))
(and (boundp 'eproject-root) eproject-root)
(and (not current-prefix-arg) (ido-read-directory-name "gpicker: " nil nil t))
(if dired-directory (expand-file-name dired-directory) default-directory))))
(when dir
(with-temp-buffer
(call-process iy-gpicker-cmd nil (list (current-buffer) nil) nil
"-t" "guess" "-m" dir)
(cd dir)
(dolist (file (split-string (buffer-string) "\0"))
(unless (string-equal file "")
(find-file file))))))
(provide 'iy-gpicker)