about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorDavid Morgan <djm_uk@protonmail.com>2022-11-11 12:07:49 +0000
committerDavid Morgan <djm_uk@protonmail.com>2022-11-11 12:07:49 +0000
commitcab1d7261b60ef068ec90c5b19f29576195e3045 (patch)
tree29674d539df8564e7017e36691b229ed2caa396f
parent4b9f7ce18a0ac01d4c396687552ec27eb5365569 (diff)
downloaddotfiles-cab1d7261b60ef068ec90c5b19f29576195e3045.tar.gz
Add deadgrep-current-directory
-rw-r--r--.emacs.d/lisp/init-search.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/.emacs.d/lisp/init-search.el b/.emacs.d/lisp/init-search.el
index bab0591..5e278e3 100644
--- a/.emacs.d/lisp/init-search.el
+++ b/.emacs.d/lisp/init-search.el
@@ -51,11 +51,16 @@
   (defun deadgrep-symbol-at-point ()
     (interactive)
     (deadgrep (thing-at-point 'symbol)))
+  (defun deadgrep-current-directory (search-term)
+    (interactive (list (deadgrep--read-search-term)))
+    (deadgrep search-term (file-name-directory buffer-file-name)))
   :bind
-  ("C-S-z" . deadgrep-symbol-at-point)
   ("C-c c d" . deadgrep)
+  ("C-S-z" . deadgrep-symbol-at-point)
+  ("C-c c C-d" . deadgrep-current-directory)
   (:map search-map
         ("d" . deadgrep)
+        ("C-d" . deadgrep-current-directory)
         ("D" . deadgrep-symbol-at-point)))
 
 (use-package affe