diff options
author | David Morgan <djm_uk@protonmail.com> | 2022-11-11 12:07:49 +0000 |
---|---|---|
committer | David Morgan <djm_uk@protonmail.com> | 2022-11-11 12:07:49 +0000 |
commit | cab1d7261b60ef068ec90c5b19f29576195e3045 (patch) | |
tree | 29674d539df8564e7017e36691b229ed2caa396f | |
parent | 4b9f7ce18a0ac01d4c396687552ec27eb5365569 (diff) | |
download | dotfiles-cab1d7261b60ef068ec90c5b19f29576195e3045.tar.gz |
Add deadgrep-current-directory
-rw-r--r-- | .emacs.d/lisp/init-search.el | 7 |
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 |