diff options
| author | Bozhidar Batsov <bozhidar@batsov.dev> | 2026-02-15 18:25:20 +0200 |
|---|---|---|
| committer | Bozhidar Batsov <bozhidar@batsov.dev> | 2026-03-10 10:55:08 +0200 |
| commit | 02859277e6aed175012c0af551ac4d7a44b92f05 (patch) | |
| tree | da0599b85d43ae0ae11ea795db660b5969c972a1 | |
| parent | 4622b8f24d195cd93c677655468508c5e0bfeb4c (diff) | |
Add projectile-find-file-all to find files ignoring VCS rules
Closes #1001
Add a new command that lists all files under the project root using
a generic file listing command (fd or find), bypassing .gitignore,
.projectile, and other ignore mechanisms. This is useful when you
need to find files that are normally excluded from the project.
| -rw-r--r-- | projectile.el | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/projectile.el b/projectile.el index 16536a5..c0591d5 100644 --- a/projectile.el +++ b/projectile.el @@ -2665,6 +2665,21 @@ With a prefix arg INVALIDATE-CACHE invalidates the cache first." (projectile--find-file invalidate-cache #'find-file-other-frame)) ;;;###autoload +(defun projectile-find-file-all () + "Jump to any file in the project, ignoring VCS and projectile ignore rules. +This lists all files under the project root using a generic file listing +command (fd or find), bypassing `.gitignore', `.projectile', and other +ignore mechanisms." + (interactive) + (let* ((project-root (projectile-acquire-root)) + (all-files (projectile-files-via-ext-command project-root projectile-generic-command)) + (file (projectile-completing-read "Find file (all): " all-files + :caller 'projectile-read-file))) + (when file + (find-file (expand-file-name file project-root)) + (run-hooks 'projectile-find-file-hook)))) + +;;;###autoload (defun projectile-toggle-project-read-only () "Toggle project read only." (interactive) @@ -6426,6 +6441,7 @@ Magit that don't trigger `find-file-hook'." '("Projectile" :visible projectile-show-menu ("Find..." ["Find file" projectile-find-file] + ["Find file (all, ignoring rules)" projectile-find-file-all] ["Find file in known projects" projectile-find-file-in-known-projects] ["Find test file" projectile-find-test-file] ["Find directory" projectile-find-dir] |
