aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBozhidar Batsov <bozhidar@batsov.dev>2026-02-15 18:25:20 +0200
committerBozhidar Batsov <bozhidar@batsov.dev>2026-02-15 18:25:20 +0200
commit29d7d480fbead22e6c4e7948da3643d5756be38d (patch)
tree7753764b0bf472bac5c11a0c564093fd900fc8d4
parentdd06dfd912656d41f2c63066aa8bacb898ddf7a2 (diff)
Add projectile-find-file-all to find files ignoring VCS rulesfeature/1001-find-all-files
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.el16
1 files changed, 16 insertions, 0 deletions
diff --git a/projectile.el b/projectile.el
index 6c5306b..9656fe8 100644
--- a/projectile.el
+++ b/projectile.el
@@ -2626,6 +2626,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)
@@ -6350,6 +6365,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]