summaryrefslogtreecommitdiff
path: root/emacs
diff options
context:
space:
mode:
authornoa@gaiwan.org2024-06-15 17:14:05 +0000
committernoa@gaiwan.org2024-06-15 17:14:05 +0000
commitd5ed3d89eedec76ab2c8dcf9ba16136fbb8824cd (patch)
tree152b254894802dd2a855c11c9b11c93d175f947b /emacs
parent8213c99308ddbe872a310f73590d664977df6eb6 (diff)
Add home directory search function
Diffstat (limited to 'emacs')
-rw-r--r--emacs/init.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/emacs/init.el b/emacs/init.el
index 1ad577e..c5da370 100644
--- a/emacs/init.el
+++ b/emacs/init.el
@@ -889,3 +889,9 @@ The misspelled word is taken from OVERLAY. WORD is the corrected word."
(comment-region (mark) (point))
(buffer-substring (mark) (point)))
"\n\n"))
+;; Define a handy function that allows me to do a full text search of every file in my home directory. For the most part, this works well; ripgrep avoids binary files. However, in some files with embedded images, it can add a lot of junk to the output.
+(defun noa/consult-rg-home ()
+ (interactive)
+ (consult-ripgrep "~/"))
+(global-set-key (kbd "<f5>") #'noa/consult-rg-home)
+